Where is this logic?  Is it inside a HiveMind service implementation object?

 


From: John Coleman [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 25, 2006 7:39 PM
To: [email protected]
Subject: wait - notify

 

Hi,

 

Any ideas if it could be HiveMind stopping this wait/notify code running?

 

  public void dispatchEvent(EventObject event) {
    events.add(event);
    System.out.println("dispatch event..." + event);
    synchronized (this) {
      notify(); // break wait state
    }
    System.out.println("notified");
  }

 

  // a loop to dispatch events to the correct type of listeners
  public void run() {
    // loop handling all events until stop is true
    do {
      try {
        // wait for some event notifications
        synchronized (this) {
          wait();
        }....

 

 

If I do wait(10) then code works fine, but the sync blocks don't seem effective. If I directly instantiate the classes w/o HM, then code works!

 

John

 

Reply via email to