Boost logo

Boost Users :

From: Foster, Gareth (gareth.foster_at_[hidden])
Date: 2004-10-13 12:37:53


Could you make it something like "enum { eLow, eNormal, eHight };
myThread.priority(eHigh);"? Maybe something non specific would be do-able,
and it might still be useful to those who aren't after lots of control? Not
that I am well clued up, just a thought.

Cheers!

Gaz

-----Original Message-----
From: boost-users-bounces_at_[hidden]
[mailto:boost-users-bounces_at_[hidden]] On Behalf Of Ben Hutchings
Sent: 13 October 2004 17:45
To: boost-users_at_[hidden]
Subject: Re: [Boost-users] Extending the boost::thread class

arno.schaefer_at_[hidden] wrote:
> Hi all,
> I want to use the boost thread library as a base for my multiplatform
> thread class. After I have studied the documentation I recognize that
> there are not all things available at the moment what I need, so I try
> to find out what is the best way to start my implementation. What I
> need, is to implement the following additional methods: suspend, resume,
> stop (or terminate), set_priority, get_priority, get_state and I want to
> have the possibility to create threads in a suspend mode.
<snip>

Why do you think you want suspend, resume and terminate? There are very
few safe uses for these operations, and programs that use them tend to
suffer from data corruption and/or deadlocks.

It would be fairly easy to add support for priority settings to
Boost.Thread, but since priority values are only meaningful in the
context of a scheduling policy and policies vary between operating
systems it would be hard to provide a genuinely portable priority system.
_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users


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