|
Boost : |
From: Beman Dawes (bdawes_at_[hidden])
Date: 2001-06-27 15:43:00
At 02:09 PM 6/27/2001, Jeremy Siek wrote:
>I like the idea of providing two layers, 1) the basic thread_id and
>lightweight API wrappers and 2) thread managers. This addresses Beman's
>concern about people writing their own wrappers... because instead boost
>will provide a standard wrapper (or set of wrappers) in layer 2). In
>addition, layer 1) provides the flexibility that is needed in usage
>scenarios that don't match those provided by layer 2).
>
>I'd prefer the lightweight API's to be free functions in namespace
thread,
>not static. I function scopes I like the option of "using" to shorten
>typing.
>
>I like "thread_id" a lot as a name for the opaque thread handle.
But notice that thread::ref as proposed in other messages isn't a layer 1
thread_id. It is a ref counted layer 2 thread manager. Layer 1 isn't
exposed in a public interface, if it even exists (assuming I understand the
proposal correctly).
On Thu, 28 Jun 2001, John Max Skaller wrote:
> class thread_api
> // lighweight API wrapper
> // purpose: platform independence
>
> class posix_api : public thread_api
> // posix extension
>
> class win32_api: public thread_api
> // win32 extension: boost only
>
> class thread_id
> // copyable thread id wrapper
>
> class my_favourite_thread_manager
> // design competetion on boost to choose
> // one or more alternatives
I haven't thought in terms of that many layers, but a layered approach is
very much the approach I'd like to see explored.
--Beman
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk