mirror of
https://github.com/opensim/opensim.git
synced 2026-08-09 02:36:00 +08:00
smartthreadpool: suport callback delegates with no return value (WaitCallBack), use it on our fireandforget (other places later)
This commit is contained in:
@@ -3142,7 +3142,7 @@ namespace OpenSim.Framework
|
||||
case FireAndForgetMethod.SmartThreadPool:
|
||||
if (m_ThreadPool == null)
|
||||
InitThreadPool(2, 15);
|
||||
threadInfo.WorkItem = m_ThreadPool.QueueWorkItem((cb, o) => {cb(o); cb = null;}, realCallback, obj);
|
||||
threadInfo.WorkItem = m_ThreadPool.QueueWorkItem(realCallback, obj);
|
||||
break;
|
||||
case FireAndForgetMethod.Thread:
|
||||
Thread thread = new Thread(delegate(object o) { realCallback(o); realCallback = null;});
|
||||
|
||||
Reference in New Issue
Block a user