On Wed, 6 Jan 2010 03:38:35 +0100 Attilio Rao <attilio_at_freebsd.org> wrote: > 2010/1/6 David Xu <davidxu_at_freebsd.org>: > > I want to go further to make some pthread synchronous objects > > process-sharable, do you guy think it is worthy ? > > except mutex and condition variable, others like rwlock and spinlock > > are relative simple. > > I'm afraid people is going to produce very messy system resulting in > process shared mutexes where IPC or threads may be used and causing > more harms than good. > Besides that, semaphore can "emulate" a fair amount of locking > features in a non-trivial fashion, forcing developers to think a lot > about it, thus reducing the risk of error. > > Said that, I think that introducing shared semaphore has been a good > idea, but I would not go further than that. > > Thanks, > Attilio > > I respectfully disagree and think having pthread-agnotsic locks processes can use to synchronize access to, say, shared memory segment content is a good think to have. People are perfectly capable of screwing up any powerful tool they are given, but that is not the reason to be held back. Solaris had lwp_{mutex|cond} for ages and lived. -- Alexander Kabaev
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:59 UTC