About thread

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nehamaru
    New Member
    • Jul 2007
    • 12

    About thread

    Hello friends ,
    I ahve doubt on wait/nitify method .

    wait/nothify is a object class method so i want to know only thread class has a wait notify method or every class can implement wait/notify method .
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by nehamaru
    Hello friends ,
    I ahve doubt on wait/nitify method .

    wait/nothify is a object class method so i want to know only thread class has a wait notify method or every class can implement wait/notify method .
    Every object can call those methods; every object can be a 'lock'; if one thread
    owns the lock (by using the synchronization mechanism), others can wait until
    they're notified by the lock owning thread. Normally you wait on some condition
    to be true or false. The lock owner should change that condition and notify the
    waiting thread(s).

    kind regards,

    Jos

    Comment

    Working...