|
-
Aug 20th, 2007, 06:54 AM
#1
Thread Starter
New Member
Asynchronous send/receive and thread pools
If I use the asynchronous send and receive methods of a (Network)Stream (or, directly, of a Socket), the .NET framework will use an internal thread pool for executing those operations.
Therefore, I obviously have to make the code that gets called that way reasonably thread-safe because I don't know on which thread the result of an asynchronous operation will come in, and certainly it won't be the one on which I started the said asynchronous operation.
What I'd like to know is:
Can I at least presume that all asynchronous operations (at least all of the same kind, i.e., all Send or all Receive operations) concerning the same (Network)Stream or the same Socket will always come in on the same thread? Or could it happen that one Send operation gets executed on thread A from the system's internal pool, the next on thread B, even though they relate to the same network communications object (Stream or Socket)?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|