Re: Timeout function for Thread.Queue->read

Marc dirix <[email protected]>
Newsgroups gmane.comp.lang.pike.user
Message-ID <CAERi-x2ya4QDKJ2aeAfBdFwfNQGcEkhv0ohTWk=TqhutRFP50w@mail.gmail.com>
Hello,

You could use try_read(), and move the timeout logic into the reading
thread.

/Marc

Op ma 29 jun. 2015 om 10:24 schreef Trilok Tourani <
[email protected]>:

> Hello all
>
> Is there any pike function for timeout for the Thread.Queue class ,read
> function? My program just hangs at that statement because there is nothing
> in the Queue, and I have to add a dummy element in queue after the timeout
> seconds.(Workaround)
>
> Please mention any function that can server this purpose.
>
> Thank you
>
>
> Regards
> Trilok Tourani
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.