DefaultNotificationService:

* Added Lock()/Unlock() for explicit locking by a service user.
* Added NotifyLocked() and made Notify() inline.
* Added HasListeners() so one can check whether there is a listener at all
  before preparing the event message.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34736 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2009-12-21 20:56:50 +00:00
parent 25037a6c06
commit 1fde952c1d
2 changed files with 21 additions and 4 deletions
+1 -3
View File
@@ -173,10 +173,8 @@ DefaultNotificationService::~DefaultNotificationService()
common bit with this mask will receive the event.
*/
void
DefaultNotificationService::Notify(const KMessage& event, uint32 eventMask)
DefaultNotificationService::NotifyLocked(const KMessage& event, uint32 eventMask)
{
RecursiveLocker _(fLock);
// Note: The following iterations support that the listener removes itself
// in the hook method. That's a property of the DoublyLinkedList iterator.