Search:

Type: Posts; User: andbin

Search: Search took 0.07 seconds.

  1. Thread: Thread Queueing

    by andbin
    Replies
    12
    Views
    1,182

    Re: Thread Queueing

    takeBook is synchronized and static, so the lock is on the java.lang.Class object of Library class.
    But in takeBook you invoke wait/notify on the (current) Thread instance. And you are not owning...
  2. Thread: Thread Queueing

    by andbin
    Replies
    12
    Views
    1,182

    Re: Thread Queueing

    Ok, I can give some more hints:

    1) You should have only 1 instance of Library and pass this instance to all PatronThread instances (how to pass the instance is up to you, there are some possible...
  3. Thread: Thread Queueing

    by andbin
    Replies
    12
    Views
    1,182

    Re: Thread Queueing

    You have not posted all the code, so it's not easy to understand the whole architecture of your application. However two things can be clearly and easily spotted in the PatronThread class.

    1) You...
Results 1 to 3 of 3