My last book made (at least) two statements that I now regret.
- Calling EndXXX on an IAsyncResult is optional.
- BeginInvoke is preferable to ThreadPool.QueueUserWorkItem.
On the former, the reality is that some implementations rely on the EndXXX call to clean up resources. Sometimes you can get away with it, but in the general case you can't.
On the latter, the fact that materializing an IAsyncResult causes a Win32 event to be allocated makes it a tough sell compared to QUWI, especially now that lambdas/closures are so much more approachable in Whidbey.
Posted
May 23 2005, 06:55 PM
by
don-box