Files
opensim/OpenSim/Data/MySQL/MySQLSuperManager.cs
Adam Frisby 0a5280edb5 * Added new "SuperManager" class for MySQL connections, for allowing multiple concurrent MySQL threads.
* Implemented SuperManager inside of UserData. This means the userserver when running on MySQL will use 10 connections (+1 system connection) to handle requests, preventing the previous mire of locking resulting in singlethreadedness.
* This requires testing and grids relying on stability should not upgrade to this revision until it's been properly tested.
2008-08-30 13:38:46 +00:00

28 lines
513 B
C#

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;
public MySQLManager Manager;
public void GetLock()
{
Locked = true;
m_lock.WaitOne();
}
public void Release()
{
m_lock.ReleaseMutex();
Locked = false;
}
}
}