aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL/MySQLSuperManager.cs
blob: effdac75c51b87563ab6d0b9bc07d49121921bf0 (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
26
27
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;

namespace OpenSim.Data.MySQL
{
    class MySQLSuperManager
    {
        public bool Locked;
        private 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;
        }

    }
}