From: SourceForge.net <no...@so...> - 2012-11-30 12:53:19
|
Bugs item #3591332, was opened at 2012-11-30 04:53 Message generated for change (Tracker Item Submitted) made by tjapoeh You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=396644&aid=3591332&group_id=29557 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Frank Olthuis (tjapoeh) Assigned to: Nobody/Anonymous (nobody) Summary: Loki::Mutex has no effect on Windows Initial Comment: Loki's locking paradigm expect locking and unlocking to take place by way of the oneliner <code> typename MyThreadingModel::Lock lock; </code> This requires locking to take place in the mutex's contructor, and unlocking in its destructor. On Windows though, Loki's default Mutex class makes use of a CRITICAL_SECTION, which is only created and destroyed in the contructor and destructor respectively. Neither EnterCriticalSection nor LeaveCriticalSection are called. In my view, the constructor and destructor should be as follows: Mutex() LOKI_THREADS_MUTEX_CTOR(mtx_) { LOKI_THREADS_MUTEX_INIT(&mtx_); LOKI_THREADS_MUTEX_LOCK(&mtx_); } ~Mutex() { LOKI_THREADS_MUTEX_UNLOCK(&mtx_); LOKI_THREADS_MUTEX_DELETE(&mtx_); } ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=396644&aid=3591332&group_id=29557 |