diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/XEngine/XWorkItem.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/XEngine/XWorkItem.cs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XWorkItem.cs b/OpenSim/Region/ScriptEngine/XEngine/XWorkItem.cs index 2ac5c31..9d9dee1 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XWorkItem.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XWorkItem.cs | |||
@@ -52,13 +52,17 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
52 | return wr.Cancel(); | 52 | return wr.Cancel(); |
53 | } | 53 | } |
54 | 54 | ||
55 | public void Abort() | 55 | public bool Abort() |
56 | { | 56 | { |
57 | wr.Abort(); | 57 | return wr.Cancel(true); |
58 | } | 58 | } |
59 | 59 | ||
60 | public bool Wait(TimeSpan t) | 60 | public bool Wait(int t) |
61 | { | 61 | { |
62 | // We use the integer version of WaitAll because the current version of SmartThreadPool has a bug with the | ||
63 | // TimeSpan version. The number of milliseconds in TimeSpan is an int64 so when STP casts it down to an | ||
64 | // int (32-bit) we can end up with bad values. This occurs on Windows though curiously not on Mono 2.10.8 | ||
65 | // (or very likely other versions of Mono at least up until 3.0.3). | ||
62 | return SmartThreadPool.WaitAll(new IWorkItemResult[] {wr}, t, false); | 66 | return SmartThreadPool.WaitAll(new IWorkItemResult[] {wr}, t, false); |
63 | } | 67 | } |
64 | } | 68 | } |