![]() |
|
|
|
|
|
|
2
15th April 15:37
External User
Posts: 1
|
The async request may complete synchronously, this comes from the internal
GetOverlappedResult function of the kernel32.dll if GetOverlappedResult call sets the result to WSA_IO_PENDING - then new thread is spawned and you wait for operation completion. if result is 0 ( no error ) operation is considered to be complete - the same thread is used to process the callback ( you should check IAsyncResult.CompletedSynchronously to define this ) all the other results indicate that error happened. Generally, if your callback takes much time to execute you can put the work there on the separate thread, but this must be done only when IAsyncResult.CompletedSynchronously is equal to true. -- Vadym Stetsyak aka Vadmyst http://vadmyst.blogspot.com |
|
|
|