diff -r b55963b3c382 code/nel/include/nel/misc/mutex.h --- a/code/nel/include/nel/misc/mutex.h Sun May 09 15:34:57 2010 -0700 +++ b/code/nel/include/nel/misc/mutex.h Sun May 09 16:08:46 2010 -0700 @@ -611,13 +611,13 @@ CAccessor(CUnfairSynchronized *cs) { Synchronized = cs; - const_cast(Synchronized->_Mutex).enter(); + const_cast(Synchronized->_Mutex).enter(); } /// release the mutex ~CAccessor() { - const_cast(Synchronized->_Mutex).leave(); + const_cast(Synchronized->_Mutex).leave(); } /// access to the Value diff -r b55963b3c382 code/nel/include/nel/misc/task_manager.h --- a/code/nel/include/nel/misc/task_manager.h Sun May 09 15:34:57 2010 -0700 +++ b/code/nel/include/nel/misc/task_manager.h Sun May 09 16:08:46 2010 -0700 @@ -140,7 +140,7 @@ /// queue of tasks, using list container instead of queue for DeleteTask methode CSynchronized _RunningTask; - CSynchronized > _TaskQueue; + CUnfairSynchronized > _TaskQueue; CSynchronized > _DoneTaskQueue; /// thread pointer diff -r b55963b3c382 code/nel/src/misc/async_file_manager.cpp --- a/code/nel/src/misc/async_file_manager.cpp Sun May 09 15:34:57 2010 -0700 +++ b/code/nel/src/misc/async_file_manager.cpp Sun May 09 16:08:46 2010 -0700 @@ -67,7 +67,7 @@ bool CAsyncFileManager::cancelLoadTask(const CAsyncFileManager::ICancelCallback &callback) { - CSynchronized >::CAccessor acces(&_TaskQueue); + CUnfairSynchronized >::CAccessor acces(&_TaskQueue); list &rTaskQueue = acces.value (); list::iterator it = rTaskQueue.begin(); @@ -87,7 +87,7 @@ } // If not found, the current running task may be the one we want to cancel. Must wait it. - // Beware that this code works because of the CSynchronized access we made above (ensure that the + // Beware that this code works because of the CUnfairSynchronized access we made above (ensure that the // taskmanager will end just the current task async (if any) and won't start an other one. waitCurrentTaskToComplete (); @@ -105,7 +105,7 @@ /* bool CAsyncFileManager::cancelLoadMesh(const std::string& sMeshName) { - CSynchronized >::CAccessor acces(&_TaskQueue); + CUnfairSynchronized >::CAccessor acces(&_TaskQueue); list &rTaskQueue = acces.value (); list::iterator it = rTaskQueue.begin(); @@ -167,7 +167,7 @@ void CAsyncFileManager::cancelSignal (bool *pSgn) { - CSynchronized >::CAccessor acces(&_TaskQueue); + CUnfairSynchronized >::CAccessor acces(&_TaskQueue); list &rTaskQueue = acces.value (); list::iterator it = rTaskQueue.begin(); diff -r b55963b3c382 code/nel/src/misc/task_manager.cpp --- a/code/nel/src/misc/task_manager.cpp Sun May 09 15:34:57 2010 -0700 +++ b/code/nel/src/misc/task_manager.cpp Sun May 09 16:08:46 2010 -0700 @@ -49,7 +49,7 @@ nlSleep(10); // There should be no remaining Tasks - CSynchronized >::CAccessor acces(&_TaskQueue); + CUnfairSynchronized >::CAccessor acces(&_TaskQueue); nlassert(acces.value().empty()); _Thread->wait(); delete _Thread; @@ -65,7 +65,7 @@ while(_ThreadRunning) { { - CSynchronized >::CAccessor acces(&_TaskQueue); + CUnfairSynchronized >::CAccessor acces(&_TaskQueue); if(acces.value().empty()) { runnableTask = NULL; @@ -126,14 +126,14 @@ // Add a task to TaskManager void CTaskManager::addTask(IRunnable *r, float priority) { - CSynchronized >::CAccessor acces(&_TaskQueue); + CUnfairSynchronized >::CAccessor acces(&_TaskQueue); acces.value().push_back(CWaitingTask(r, priority)); } /// Delete a task, only if task is not running, return true if found and deleted bool CTaskManager::deleteTask(IRunnable *r) { - CSynchronized >::CAccessor acces(&_TaskQueue); + CUnfairSynchronized >::CAccessor acces(&_TaskQueue); for(list::iterator it = acces.value().begin(); it != acces.value().end(); it++) { if(it->Task == r) @@ -148,7 +148,7 @@ /// Task list size uint CTaskManager::taskListSize(void) { - CSynchronized >::CAccessor acces(&_TaskQueue); + CUnfairSynchronized >::CAccessor acces(&_TaskQueue); return acces.value().size(); } @@ -164,7 +164,7 @@ void CTaskManager::dump (std::vector &result) { CSynchronized::CAccessor accesCurrent(&_RunningTask); - CSynchronized >::CAccessor acces(&_TaskQueue); + CUnfairSynchronized >::CAccessor acces(&_TaskQueue); CSynchronized >::CAccessor accesDone(&_DoneTaskQueue); const list &taskList = acces.value(); @@ -215,7 +215,7 @@ uint CTaskManager::getNumWaitingTasks() { - CSynchronized >::CAccessor acces(&_TaskQueue); + CUnfairSynchronized >::CAccessor acces(&_TaskQueue); return acces.value().size(); } @@ -225,7 +225,7 @@ { if (_ChangePriorityCallback) { - CSynchronized >::CAccessor acces(&_TaskQueue); + CUnfairSynchronized >::CAccessor acces(&_TaskQueue); list &taskList = acces.value(); list::iterator ite = taskList.begin();