diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLSuperManager.cs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/OpenSim/Data/MySQL/MySQLSuperManager.cs b/OpenSim/Data/MySQL/MySQLSuperManager.cs new file mode 100644 index 0000000..848a0bd --- /dev/null +++ b/OpenSim/Data/MySQL/MySQLSuperManager.cs | |||
@@ -0,0 +1,27 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | using System.Threading; | ||
5 | |||
6 | namespace OpenSim.Data.MySQL | ||
7 | { | ||
8 | class MySQLSuperManager | ||
9 | { | ||
10 | public bool Locked; | ||
11 | private Mutex m_lock; | ||
12 | public MySQLManager Manager; | ||
13 | |||
14 | public void GetLock() | ||
15 | { | ||
16 | Locked = true; | ||
17 | m_lock.WaitOne(); | ||
18 | } | ||
19 | |||
20 | public void Release() | ||
21 | { | ||
22 | m_lock.ReleaseMutex(); | ||
23 | Locked = false; | ||
24 | } | ||
25 | |||
26 | } | ||
27 | } | ||