On Aug 31, 11:54 am, "Umesh Bywar" <[EMAIL PROTECTED]> wrote: > Can I interrupt PR_Poll or PR_Read? I would like to stop mozilla from > reading the data on a socket for sometime and then would like to resume it > after some of my functions which are on a different thread are done. > Please let me know.
I would say "no". If only because I doubt you have a handle to the thread which is blocked reading. The xpcom model doesn't really expect you to be operating on PR_Read in such a way that this matters. However, if you're not bound by xpcom, then perhaps you do have enough control. In general, I'd suggest you just avoid reading if you don't know you have something to read. In pure nspr coding, the answer would probably be "maybe": http://www.mozilla.org/projects/nspr/reference/html/printro.html#13397 http://www.mozilla.org/projects/nspr/reference/html/prthrd.html#15471 Bugs PR_Interrupt has the following limitations and known bugs: * File I/O is considered instantaneous, so file I/O functions cannot be interrupted. Unfortunately the standard input, output, and error streams are treated as files by NSPR, so a PR_Read call on PR_STDIN cannot be interrupted even though it may block indefinitely. _______________________________________________ dev-tech-xpcom mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-xpcom
