My motivation for writing all this patches (besides bug in using pthread_cond) 
was bad (coarse) locking for unix. It uses one static mutex in Thread class for 
almost all synchronization in the whole code.

While I agree that spinning is suitable for FastCriticalSection, it's not easy 
to implement it properly and effective. At first glance, current implementation 
may be subject to priority inversion, and therefore, deadlocks.

I'm not sure, what solution will be acceptable for both unix and windows. For 
intrusive_ptr, I'd just use boost shared_ptr/atomic (as in my patch). For 
critical sections, I think correctness is priority, and then optimization. And 
portability is also good.

-- 
https://code.launchpad.net/~gpr/dcplusplus/sync/+merge/32912
Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.

_______________________________________________
Mailing list: https://launchpad.net/~linuxdcpp-team
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~linuxdcpp-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to