comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Non-blocking read
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Non-blocking read [message #75619 is a reply to message #75617] Wed, 16 March 2011 07:33 Go to previous messageGo to previous message
David Grier is currently offline  David Grier
Messages: 35
Registered: July 2010
Member
On 3/15/11 9:49 PM, wlandsman wrote:
> On Tuesday, March 15, 2011 8:22:38 PM UTC-4, David Grier wrote:
>
>> I'm using OPENW, WRITEU and READU to interact with a piece of equipment
>> through a serial port. Everything's fine unless there's an error
>> condition on the read. If the read fails, then the IDL session hangs
>> irretrievably. I'd like to use a non-blocking read so that failure
>> yields no value and some error condition that I can check.
>
> Would it help to use
> if FILE_POLL_UNIT( unit, 0) then readu,...
>
> My IDL session hangs about 1 in a 1000 times when trying to read an internet socket.
> I've tried using the above code snippet, but I don't know yet if it works, because
> I the failures occur so unpredictably. (And once the IDL session does hang, one
> loses any diagnostics.) -Wayne

Brilliant! I never would have found this routine, and it does just what
I need.

Many thanks Wayne.

David
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: sky is falling, again ?
Next Topic: Atmospheric trajectories

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:03:40 PDT 2025

Total time taken to generate the page: 0.00411 seconds