From: Zoran V. <zv...@ar...> - 2006-01-07 08:16:21
|
Am 06.01.2006 um 19:00 schrieb Vlad Seryakov: > sockPtr will be queued into the connection queue for processing, it > may happen from driver thread or from spooler thread, works equally. Hmhmhmhmhmhmhm... The SOCK_SPOOL is only retured from SockRead(). The SockRead() is only attempted in the DriverThread if : if (sockPtr->drvPtr->opts & NS_DRIVER_ASYNC) { n = SockRead(sockPtr, 1); } else { n = SOCK_READY; } So, the same test as above in SpoolThread has no meaning at all since you will never come to SpoolThread unless somebody (driver thread) calls SockRead which MAY return SOCK_SPOOL. Do I see this right? I'm not nitpicking! I'm just trying to understand the code. I believe this thing could be misleading and you should (if I'm correct) remove the above snippet from the SpoolThread and just write: n = SockRead(sockPtr, 1); Zoran |