Re: A note on the EventManager

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Fri Jun 27 2003 - 19:44:43 EDT

  • Next message: Andrus Adamchik: "Re: EventSubject implementation"

    On Friday, June 27, 2003, at 06:34 PM, Holger Hoffstätte wrote:

    >
    > It recently dawned on me that the EventManager is not really
    > deadlock-free
    > since it won't take provisions against observers posting more
    > notifications while a dispatch is running, resulting in an endless
    > loop.
    > NSNotificationQueue had something like an internal "isPostingEvents"
    > barrier that, when true, would queue up incoming posting requests until
    > the current loop had cleared. This directly raises the obvious question
    > "how many?" :)
    > Just something to think about for now.

    Yeah, I am pretty sure that when we start using EventManager "for
    real", we will need to solve lots of concurrency issues. One thing I
    can see right now is threaded notification dispatch (e.g. if each event
    listener takes considerable time to run, this will block the thread
    that sent the event). So we will need an event queue, to separate
    sender from receivers, etc.

    Andrus



    This archive was generated by hypermail 2.0.0 : Fri Jun 27 2003 - 19:44:42 EDT