1
为什么下面的代码始终在obj
中返回False
。我已确保SomeBoolReturningFunc
正在返回True
。从ThreadPool返回值线程
Dim obj As Object = False
ThreadPool.QueueUserWorkItem(Sub(state)
state = SomeBoolReturningFunc()
End Sub,
obj)
'Keep waiting till queued thread completes
Return obj
谢谢你一堆。这正是我最终的结果。这也提出了另一个问题,我发布在http://stackoverflow.com/questions/15064027/is-there-a-built-in-generic-class-for-this-in-net。请看一看。 – dotNET 2013-02-25 09:46:58