smartthreadpool: suport callback delegates with no return value (WaitCallBack), use it on our fireandforget (other places later)

This commit is contained in:
UbitUmarov
2020-12-31 13:04:44 +00:00
parent 960a0fa360
commit b61df051db
4 changed files with 143 additions and 63 deletions

View File

@@ -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;});