Observer pattern for 1:n relationship?

From: Roy Smith (roy_at_panix.com)
Date: 05/25/04


Date: Tue, 25 May 2004 10:35:33 -0400

I've got threaded system where one thread generates events and another
thread consumes them. They use a shared double-ended queue for
communication. I'm not very happy with the clarity of the
implementation.

Would it make sense to (re)-implement this using the Observer Pattern?
Observer is traditionally used for 1:n relationships (many observers
watching a single observee). Is there any reason not to use it for a
1:1 relationship?



Relevant Pages

  • Re: Quantum entanglement and information transfer
    ... These correlations ... > require no communication between the correlated ... information state of an observer at B (even if the only information is ... The fact that quantum entanglement is ...
    (sci.physics.research)
  • Re: Suggestions For The Passing of Passphrases
    ... > secret or protocol. ... > Therefore, the communication protocol must be negotiated in public, and ... If the observer knows the identity of the participants ... I think the protocol is as secure as SRP. ...
    (sci.crypt)
  • Re: Suggestions For The Passing of Passphrases
    ... secret or protocol. ... Therefore, the communication protocol must be negotiated in public, and ... an observer will know the type of information agreed upon as ... I think the protocol is as secure as SRP. ...
    (sci.crypt)
  • Re: Observer pattern for 1:n relationship?
    ... > communication. ... I'm not very happy with the clarity of the ... > Would it make sense to -implement this using the Observer Pattern? ... check out a mostly-ignored programming methodology called "Flow Based ...
    (comp.object)
  • Re: Observer pattern for 1:n relationship?
    ... > thread consumes them. ... I kept the Observer Pattern, I could not do away with the threads. ... event queue. ... it should spawn another thread to do the notification. ...
    (comp.object)