ThreadPool.QueueUserWorkItem delegate never gets called
I am using MonoTouch 4.03. I have some code like this:
ThreadPool.QueueUserWorkItem (delegate
{
Debug.WriteLine("Making connect request");
client.Connect();
});
About one in 10 times it doesn't get fired. I'm only making very light use of ThreadPool.
NOTE (added 19th July): Currently I have turned LLVM optimisation off and th开发者_StackOverflow社区at appears to have cured it.
This is fixed in MonoTouch 4.06 (or possibly the version before - in any case, it's fixed). I suspect the LLVM optimiser. The MonoTouch release notes show a number of bug fixes in that area.
精彩评论