Re: Multithread safety



Eugene Gershnik wrote:
>
> However, posting multiple reads from different threads is still a bad
> idea. Why would you want to do this?

Actually, thinking about it more, for many protocols it should be pretty
natural to post read requests immediately from the thread that waits on
completion status. In this case (assuming you have more than one thread in
the pool) you will end up posting reads simultaneously. So I guess the OS
kernel is probably written with this in mind. Also, looking at some old code
I have I actually can see myself doing it. ;-)
So I guess I'll take back the statement I made a few posts back. It should
be safe to *post* simultaneous reads/writes on an IOCP socket.


--
Eugene
http://www.gershnik.com


.


Loading