Giter Club home page Giter Club logo

Comments (6)

JamesMc86 avatar JamesMc86 commented on September 3, 2024

To be fair - this could be the step itself causing LabVIEW to hang - perhaps nothing to worry about

from g-cli.

JamesMc86 avatar JamesMc86 commented on September 3, 2024

Even with a longer handover timeout we still see this - it isn't clear what the causality is but it should probably be treated as a separate issue.

from g-cli.

JamesMc86 avatar JamesMc86 commented on September 3, 2024

So I think this will all be improved if we can improve the robustness of the socket connection. One being polling with a timeout so we can handle this condition seperate to a disconnect. A timeout on the blocking call causes an exception but not an async call. This will also reduce the message errors on a timeout. See example below:

byte[] data = new byte[4096];
IASyncResult result = stream.BeginRead(data, 0, data.Length, null, null);
result.AsyncWaitHandle.WaitOne();
int bytes = stream.EndRead(result);

if (!result.IsCompleted)

else

...

from g-cli.

JamesMc86 avatar JamesMc86 commented on September 3, 2024

If we can still use exceptions (trying to confirm) there is an inner exception which should give more detail for better handling.

from g-cli.

JamesMc86 avatar JamesMc86 commented on September 3, 2024

Moving to async doesn't help.

I have confirmed the hang is due to what is being called in LabVIEW - it isn't clear why the process shows as exited though

from g-cli.

JamesMc86 avatar JamesMc86 commented on September 3, 2024

Fixed the race condition by setting stop on exit and using while instead. Not clear why. Will address in #55 to see if there is a more reliable method.

from g-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.