CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: Sleep question

  1. #1
    Join Date
    May 2005
    Posts
    25

    Sleep question

    Do my other threads still run while I call sleep in the main thread? and, when I call sleep does my app still continue to receive messages?

  2. #2
    Join Date
    Feb 2000
    Location
    Indore, India
    Posts
    1,046

    Re: Sleep question

    Hello,

    If a thread is started before a call to sleep, performance of that thread will not be affected by Sleep command. But the thread calling the Sleep command will be stopped for the time mentioned. Messages will be pumped to the message queue but will be processed only after the application wakes up after Sleep command.

    Regards.
    Pravin.
    14-07-2005.

  3. #3
    Join Date
    May 2005
    Posts
    25

    Re: Sleep question

    Thanks.

  4. #4
    Ejaz's Avatar
    Ejaz is offline Elite Member Power Poster
    Join Date
    Jul 2002
    Location
    Lahore, Pakistan
    Posts
    4,211

    Re: Sleep question

    Quote Originally Posted by dave18285
    Do my other threads still run while I call sleep in the main thread? and, when I call sleep does my app still continue to receive messages?
    Also have a look at Using Sleep()

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured