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 #75622 is a reply to message #75619] Tue, 15 March 2011 18:49 Go to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
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
[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:29 PDT 2025

Total time taken to generate the page: 0.00515 seconds