> Then figured out that blocking is happening at fopen.
>
> alternative to fopen, open() can be used to open a PIPE in non-blocking
> mode.
> open("name" ,O_RDONLY | O_NONBLOCK)
If you want to do this, then I suggest that you subclass
"ByteStreamFileSource", and define a new function
"your
Initially i thought the pipe read would be blocking till data is available. You
clarified in linux it will not block.
Then figured out that blocking is happening at fopen.
alternative to fopen, open() can be used to open a PIPE in non-blocking mode.
open("name" ,O_RDONLY | O_NONBLOCK)
On
> I am using Linux.
Good.
> Before going to read function, the program blocks at
> ByteStreamFileSource::createNew when it tries to do OpenInputFile on a pipe.
OK, now you're talking about something else. Beforehand, you were talking
about reading from a pipe - which is done (in your case)
Hi Ross,
I am using Linux.
Before going to read function, the program blocks at
ByteStreamFileSource::createNew when it tries to do OpenInputFile on a pipe.
I was not able to find any options to call fopen in non blocking mode.
Regards,
Sambhav
On Feb 28, 2012, at 9:20 AM, Ross Finlayson wr
> In ByteStreamFileSource::doReadFromFile(), read/fread blocks until there is
> any data.
No, that happens only if READ_FROM_FILES_SYNCHRONOUSLY is defined, and that's
defined only for Windows, where you have no choice in the matter (because
Windows doesn't let you treat open files as select(