aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL/MySQLSuperManager.cs
blob: 4a9c7fa82b40b2d72651052eb06c6faee9c8e03e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
using System.Threading;

namespace OpenSim.Data.MySQL
{
    public class MySQLSuperManager
    {
        public bool Locked;
        private readonly Mutex m_lock = new Mutex(false);
        public MySQLManager Manager;

        public void GetLock()
        {
            Locked = true;
            m_lock.WaitOne();
        }

        public void Release()
        {
            m_lock.ReleaseMutex();
            Locked = false;
        }

    }
}