Reply to post: Re: Software has to pay attention

Meltdown/Spectre week three: World still knee-deep in something nasty

Martin an gof Silver badge

Re: Software has to pay attention

Since then I have been chasing my tail trying to pass a parameter to the DLL function

I - even though merely a code "dabbler" in comparison - feel your pain. My current nightmare is trying to read "stream" output (i.e. stdout) from a command in a non-blocking manner - I can set the thing off from Python, but then I need to "do other things" while the command executes, and check every now and then for output. All the recommended methods either insist on waiting until the command has terminated (this is a looping video player so it won't terminate), or will block if the stream is empty (which it usually is if there are no errors).

Current best bet seems to be using a timeout, but as you say, this doesn't "satisfy my soul". WHY does reading from a stream have to block? Why can't it return empty if there's nothing to read? Why doesn't there seem to be a way to check if there's data in the stream?


(Just watch some know-it-all point me at a very easy solution... I said I was just a dabbler!)

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon


Biting the hand that feeds IT © 1998–2019