Search:

Type: Posts; User: helloworld922

Search: Search took 0.13 seconds.

  1. Replies
    11
    Views
    3,225

    Re: Object o = new Object(); need help

    Yes, but the special thing about wait is that the CPU is not being fully utilized to perform that task, where as an infinite while/for loop is maxing out your CPU. I still think it's kind of weird......
  2. Replies
    11
    Views
    3,225

    Re: Object o = new Object(); need help

    Maybe you should take a look at this:
    Synchronized Statements

    The only thing I can think of is that wait causes the current thread to wait until o.notify() or o.notifyAll() are called. However,...
  3. Replies
    11
    Views
    3,225

    Re: Object o = new Object(); need help

    hmm... I'm not so good with multi-threaded code, but I think it creates an Object o, then tells o to wait until it's been notified. The synchronized means that only one thread has access to it's guts...
Results 1 to 3 of 3