mirror of
https://github.com/opensim/opensim.git
synced 2026-05-16 03:36:04 +08:00
* 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.
28 lines
513 B
C#
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;
|
|
}
|
|
|
|
}
|
|
}
|