aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/XEngine/XWorkItem.cs (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Update SmartThreadPool to latest version 2.2.3 with a major and minor change.Justin Clark-Casey (justincc)2013-05-011-3/+3
| | | | | | | | | | SmartThreadPool code comes from http://www.codeproject.com/Articles/7933/Smart-Thread-Pool This version implements thread abort (via WorkItem.Cancel(true)), threadpool naming, max thread stack, etc. so we no longer need to manually patch those. However, two changes have been made to stock 2.2.3. Major change: WorkItem.Cancel(bool abortExecution) in our version does not succeed if the work item was in progress and thread abort was not specified. This is to match previous behaviour where we handle co-operative termination via another mechanism rather than checking WorkItem.IsCanceled. Minor change: Did not add STP's StopWatch implementation as this is only used WinCE and Silverlight and causes a build clash with System.Diagnostics.StopWatch The reason for updating is to see if this improves http://opensimulator.org/mantis/view.php?id=6557 and http://opensimulator.org/mantis/view.php?id=6586
* Use an integer when specifying the XWorkItem wait rather than a TimeSpan to ↵Justin Clark-Casey (justincc)2013-02-121-1/+5
| | | | | | | | | | | avoid a Windows casting issue in SmartThreadPool for large TimeSpans. TimeSpan.Milliseconds is an int64. However, STP casts this to an int (32-bit). If TimeSpan.MaxValue is given then the casting results in an invalid value for the SDK WaitHandle.WaitAll() call. This was causing the co-op script termination regression tests to fail on Windows but not Mono 2.10.8 (which is perhaps not strict in the negative values that it accepts). Solution here is to use the int millisecondsTimeout STP call rather than the TimeSpan one. This also allows us to more clearly specify Timeout.Infinite rather than TimeSpan.MaxValue Thanks to Teravus for this spot.
* Minor: Change OpenSim to OpenSimulator in older copyright headers and ↵Jeff Ames2009-06-011-1/+1
| | | | LICENSE.txt.
* Refactor IScriptInstance / IScriptEngine to use a generic IScriptWorkItem,Melanie Thielker2008-08-281-0/+65
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.