Search:

Type: Posts; User: evthim

Search: Search took 0.11 seconds.

  1. Replies
    3
    Views
    2,866

    Re: wait(), sleep() and notify()

    Ok, let's say I don't use sleep(). Here's what I'm trying to do and can't seem to figure out the way.
    I create n number of threads
    in the run() method:
    if(function returns false){
    ...
  2. Replies
    3
    Views
    2,866

    wait(), sleep() and notify()

    Let's say I call Thread.currentThread().wait(), then a couple of lines down I call Thread.currentThread().sleep(2000) in a while loop.
    Several lines after that, if a condition is met, I call...
Results 1 to 2 of 2