linuxdcpp-team team mailing list archive
-
linuxdcpp-team team
-
Mailing list archive
-
Message #01976
[Bug 617757] Re: portable FastCriticalSection implementation
I agree, these typedefs are better than my patch.
The only drawback I see is that recursive_mutex and lock_guard are not garanteed to be header-only.
--
portable FastCriticalSection implementation
https://bugs.launchpad.net/bugs/617757
You received this bug notification because you are a member of LinuxDC++
Team, which is subscribed to LinuxDC++.
Status in DC++: Fix Committed
Status in Linux DC++: New
Bug description:
patch attached.
It may have benefits on win32, the old implementation used sleep(1) in "fast" critical section (Thread::yield).
Now Thread::yield seems to be unused, I think it should be removed, it's dangerous. Incorrectly using scheduler's yield may lead to unnecessary cpu consumption.
I tested only unix after patching this.
References