开发者

ThreadPool.QueueUserWorkItem delegate never gets called

开发者 https://www.devze.com 2023-03-19 01:34 出处:网络
I am using MonoTouch 4.03. I have some code like this: ThreadPool.QueueUserWorkItem (delegate { Debug.WriteLine(\"Making connect request\");

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消