aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL/MySQLSuperManager.cs
blob: f4341d4786b83224532f500334c7df41b86fc27c (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
25
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 string Running;

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

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

    }
}