[haiku-bugs] Re: [Haiku] #6400: BLocker won't unlock from a different thread
- From: "anevilyak" <trac@xxxxxxxxxxxx>
- Date: Wed, 28 Jul 2010 17:26:07 -0000
#6400: BLocker won't unlock from a different thread
----------------------------+-----------------------------------------------
Reporter: darkwyrm | Owner: axeld
Type: bug | Status: new
Priority: normal | Milestone: R1
Component: System/Kernel | Version: R1/alpha2
Resolution: | Keywords:
Blocked By: | Has a Patch: 0
Platform: All | Blocking:
----------------------------+-----------------------------------------------
Comment (by anevilyak):
That's actually very bad practice generally, usually the thread acquiring
a lock should also be the one that releases it when done, mix and matching
is almost invariably asking for trouble. BLocker guards against that
situation intentionally for that reason, c.f. http://dev.haiku-
os.org/browser/haiku/trunk/src/kits/support/Locker.cpp#L152
--
Ticket URL: <http://dev.haiku-os.org/ticket/6400#comment:1>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.
Other related posts: