dcsimg
www.webdeveloper.com
Results 1 to 3 of 3

Thread: Thread.sleep() help, how does it decide which thread to sleep?

  1. #1
    Join Date
    Aug 2006
    Location
    Monterrey, Mexico
    Posts
    162

    Thread.sleep() help, how does it decide which thread to sleep?

    Hi,
    I've been having some problems on an application where some timeouts are occurring, i think it may have something to do with the fact that i use Thread.sleep() in some processes.

    The question is, if i have a bunch of threads running at the same time how does this class decide which Thread to sleep?

  2. #2
    Join Date
    Sep 2012
    Posts
    3
    Thread.sleep() paused the current thread, which is the calling thread to be more specific.

  3. #3
    Join Date
    Aug 2006
    Location
    Monterrey, Mexico
    Posts
    162
    Hi,

    I thought the same thing but i'm not sure that's correct.
    sleep() is a static method of the class Thread, so, how does it know which Thread to sleep??

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles