|
Boost : |
From: Jeff Flinn (TriumphSprint2000_at_[hidden])
Date: 2004-07-27 15:06:52
"Michael Glassford" <glassfordm_at_[hidden]> wrote in message
news:ce68e5$48s$1_at_sea.gmane.org...
> Dayton wrote:
> > Roland wrote:
> >
> > but the current model of
> > associating a single method with a thread could be implemented as a
> > specialization of a more object-oriented approach of modelling a thread
> > as a class instance.
>
> There disadvantages to that approach, which have been detailed elsewhere
> (I believe in other postings in this mailing list, in
> comp.programming.threads, etc.). One disadvantage, for example, is that
> you you have to do a lot of extra work to create a new type of worker
> thread, while in the Boost.Threads approach there's only one type of
> thread class and you do a different type of work simply by writing a new
> thread function.
Which can be a state-ful function object. I'm not sure if the OP is under
the impression that only functions can be passed
Jeff F
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk