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

Threaded View

  1. #1
    Join Date
    Jan 2012

    [RESOLVED] How can I restart a thread at midnight?



    I am running Ubuntu 11.04.

    I have an application that downloads data from the remote web server. This web server shuts down for maintenance at midnight for about ten minutes. So I need to disconnect from the server at 11:55pm and connect again at 12:05am. I use sockets so to disconnect I need to logout and close the socket, and to re-connect I need to open socket and logon. The part of my application that downloads data runs in its own thread.

    So I need to stop the thread at 11:55pm and start at 12:05am. How can I do that in non-blocking way? I do not want to run a loop and poll for system time that will suck up CPU time.

    Last edited by vincegata; January 19th, 2012 at 02:30 PM.

Tags for this Thread

Posting Permissions

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

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.