|
Boost : |
From: Maxim Egorushkin (e-maxim_at_[hidden])
Date: 2003-06-30 12:32:52
"William E. Kempf" <wekempf_at_[hidden]> wrote in message
news:4432.167.16.75.51.1056983517.squirrel_at_frodo.kempf-ville.com...
> Priorities are implemented, but still undergoing design changes, in the
> thread_dev branch. The timer, if I understand what you want, is trivial
> to implement portably with the current Boost.Threads interfaces, but I do
> plan on addressing this as well.
Speaking about the timer I ment something like that:
typedef int milliseconds;
class stopwatch
{
public:
stopwatch()
: started_(::GetTickCount())
{}
milliseconds elapsed() const
{
return ::GetTickCount() - started_;
}
private:
const DWORD started_;
};
>
> > I'm aware of the fact that it's very operating system specific. But I do
> > think that it could be done with elegance and ease in the spirit the
> > whole library adhere. The first thing to come in mind is to add a couple
> > of member functions to boost::thread like this:
> >
> > class thread
> >
> > {
> >
> > // ...
> >
> > void increase_priority();
> >
> > void decrease_priority();
>
> Not that useful, IMO. Usually you want to set a specific priority, and
> this interface would require several calls to do so. Further, these calls
> can fail, so should probably have bool return types.
Agree.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk