OpenSimMirror/OpenSim
Justin Clark-Casey (justincc) 539ffb7769 Use thread-safe version of .NET Random as the SDK class is not thread-safe.
As per http://msdn.microsoft.com/en-us/library/system.random%28v=vs.100%29.aspx, the .NET Random class is not thread-safe.
If called by multiple threads at once, methods may return 0.
Except for llRand(), other OpenSimulator code did not lock before calling a shared Random instance.
This commit adds a ThreadSafeRandom class that extends Random but does internal locking so that it is thread-safe.
This change is invisible to existing callers and the explicit locking in the llFrand() implementation is now redundant.
2014-08-02 00:54:42 +01:00
..
Addons Don't try to package null invites. 2014-06-10 20:29:24 +01:00
ApplicationPlugins Actually call Close() for shared region modules when the simulator is being shutdown. 2014-08-02 00:50:10 +01:00
Capabilities
ConsoleClient
Data
Framework Use thread-safe version of .NET Random as the SDK class is not thread-safe. 2014-08-02 00:54:42 +01:00
Region Use thread-safe version of .NET Random as the SDK class is not thread-safe. 2014-08-02 00:54:42 +01:00
Server
Services Add experimental "show grid size" robust console command. 2014-08-02 00:52:53 +01:00
Tests Actually call Close() for shared region modules when the simulator is being shutdown. 2014-08-02 00:50:10 +01:00
Tools Improved line map heuristics. 2014-08-02 00:49:36 +01:00