On Jul 12, 8:59 pm, Wan-Teh Chang <[EMAIL PROTECTED]> wrote:
> Yahel Zamir wrote:
>
> > OK... Since my application does not use PRThread's I guess should
> > obtain the PRThread id of the Read thread and the Write thread (using
> > PR_GetCurrentThread), and then we can interrupt each thread by calling
> > PR_Interrupt. As a result, both blocking calls will return an error,
> > and then we can close the socket.
>
> Yes.  Note that you need to wait until the Read thread has returned
> from the blocking read call before you can close the socket.  That
> may require additional synchronization between the Read thread and
> the interrupting thread.
>
> Wan-Teh

Of course.

Actually, it might be a good idea to give a hint about PR_Interrupt in
the NSPR reference section about blocking and non-blocking IO,
especially about sockets. Maybe it is even worth mentioning in
PR_Close / PR_Shudown / PR_Read / PR_Write.

Thanks a lot for you help!

_______________________________________________
dev-tech-crypto mailing list
dev-tech-crypto@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-crypto

Reply via email to