Boost logo

Boost Users :

From: Leon Mergen (leon_at_[hidden])
Date: 2005-10-05 15:03:07


On Tue, 2005-10-04 at 16:00 +0100, Ben Hutchings wrote:
> >I'm new to boost.threads and have a basic question.
> >During program execution the user has to check the connection
> >to a server. This action should take place in a simple thread.
> >
> >
> Do you mean that the program attempts to make a socket connection using
> a new thread?
>
> >If the user gets bored waiting for responce, he should be able to
> >stop the process and return back to the main application.
> >
> >
> How will the user interrupt?

You could also define a volatile bool, which the thread checks once in x
steps ( i could imagine this thread being in some sort of loop ). If
this bool changes value, perhaps by another thread which is in control
of a user interace, the thread could cease all actions and exit.

The both threads would have to share one common value, though...

-- 
Leon Mergen



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net