Proactor

Discussion in 'C++' started by Christopher, Nov 2, 2011.

  1. Christopher

    Christopher Guest

    Reading about this design pattern, everything makes sense in the
    invoking side of it, but the pattern fails to address the fact that
    the event handling side of it occurs on seperate threads. As such, a
    mess is created when the handling side needs to access or mutate
    anything that the invoking side also wants to access or mutate.

    In other words, there has to be synchronization between the invoker
    and the handler.
    I've tried mutexes, but it has made countless deadlocks and turned my
    code into spaghetti.

    Is there a pattern that addresses this problem?
    Christopher, Nov 2, 2011
    #1
    1. Advertising

  2. On 11/2/2011 6:35 PM, Christopher wrote:
    > Reading about this design pattern, everything makes sense in the
    > invoking side of it, but the pattern fails to address the fact that
    > the event handling side of it occurs on seperate threads. As such, a
    > mess is created when the handling side needs to access or mutate
    > anything that the invoking side also wants to access or mutate.
    >
    > In other words, there has to be synchronization between the invoker
    > and the handler.
    > I've tried mutexes, but it has made countless deadlocks and turned my
    > code into spaghetti.
    >
    > Is there a pattern that addresses this problem?


    Seems like your post belongs to 'comp.software.patterns' and
    'comp.programming.threads' rather than here.

    V
    --
    I do not respond to top-posted replies, please don't ask
    Victor Bazarov, Nov 3, 2011
    #2
    1. Advertising

  3. Christopher

    Christopher Guest

    On Nov 3, 7:05 am, Victor Bazarov <> wrote:
    > Seems like your post belongs to 'comp.software.patterns' and
    > 'comp.programming.threads' rather than here.


    Fair enough. I wasn't aware of a newsgroup specific to patterns.
    Bookmark added. Thanks Victor.
    Christopher, Nov 3, 2011
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rickert
    Replies:
    0
    Views:
    642
    Rickert
    Oct 6, 2011
Loading...

Share This Page