Search:

Type: Posts; User: mynorka

Search: Search took 0.11 seconds.

  1. Replies
    12
    Views
    1,184

    Re: Thread Queueing

    Here's the full text

    Exception in thread "t1" java.lang.IllegalMonitorStateException
    at java.lang.Object.notify(Native Method)
    at csu.mcdonald.Library.returnBook(Library.java:34)
    at...
  2. Replies
    12
    Views
    1,184

    Re: Thread Queueing

    I've modified the Library class to include two methods for retrieving and returning books, however, I keep getting a IllegalMonitorStateException whenever I try and run the program


    public class...
  3. Replies
    12
    Views
    1,184

    Re: Thread Queueing

    Could I pass an instance of Library to the PatronThread constructor? And if I do that, wouldn't it still create a separate instance of Library for each Thread?
    For example:


    public...
  4. Replies
    12
    Views
    1,184

    Re: Thread Queueing

    Here's the rest of the code

    Library Class


    package csu.mcdonald;

    import java.util.LinkedList;

    public class Library {
  5. Replies
    12
    Views
    1,184

    Thread Queueing

    Hello all!

    I'm writing a simple program that consists of 10 threads and a library of 5 books. Each thread checks to see if the library has any books to check out, and enters a FIFO queue if the...
Results 1 to 5 of 5