Refactor IScriptInstance / IScriptEngine to use a generic IScriptWorkItem,

which is a thin wrapper around a IWorkItemResult from the SmartThreadPool.
However, it is very easy to reimplement on top of basic threading and therefore
makes the IScriptInstance class independent of the specific threading
implementation.
This commit is contained in:
Melanie Thielker
2008-08-28 00:37:22 +00:00
parent 82aa9ba2b5
commit bf4d1fbb8d
5 changed files with 79 additions and 7 deletions

View File

@@ -655,10 +655,10 @@ namespace OpenSim.Region.ScriptEngine.XEngine
//
// Used by script instances to queue event handler jobs
//
public IWorkItemResult QueueEventHandler(object parms)
public IScriptWorkItem QueueEventHandler(object parms)
{
return m_ThreadPool.QueueWorkItem(new WorkItemCallback(
this.ProcessEventHandler), parms);
return new XWorkItem(m_ThreadPool.QueueWorkItem(new WorkItemCallback(
this.ProcessEventHandler), parms));
}
//