aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL/MySQLSuperManager.cs
blob: b2485b1c68f38a6321817825a16741c2b233bf98 (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;
        }

    }
}