• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

threads

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey guys
Can any one help me in having a link about Threads.
My real problem is I can't judge the output in the programs with threads especially when wait, sleep methods are used.

I appreciate any help in advance
uzma
 
Sheriff
Posts: 11343
Mac Safari Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I suggest...
  • The Threads lesson in The Java Tutorial, and
  • The Concurrency chapter in Bruce Eckel's Thinking in Java.
  •  
    Ranch Hand
    Posts: 134
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    the basic difference betwwen sleep and wait is that
    sleep takes the lock when it sleeps. so other thread
    which also wants to enter the same synchronized method
    on the same object couldnot enter. but wait release the
    lock . so other thread which wants to enter the same
    synchronized method on the same objectcould do so.
     
    uzma Akbar
    Ranch Hand
    Posts: 40
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    thanks weber and mahapatra

    These links are quite helpful. Knowing only the difference between sleep and wait did not really help when it comes to programs and their output. I get really confused what exactly be the out put and sometimes the output is undetermined.

    thank you guys for putting your effort again!

    uzma
    reply
      Bookmark Topic Watch Topic
    • New Topic