Boost logo

Boost :

From: Alexander Terekhov (terekhov_at_[hidden])
Date: 2001-08-22 14:12:08

> The cost of propagation using pointers is guaranteed
> to be smaller for a well designed sharing/no sharing mechanism
> than any general pupose function call. The argument is
> spurious. The proof is trivial: you can share by passing
> a single pointer at construction time to a data structure
> which provides key to pointer mapping just as the POSIX
> function does. So you can manually do at least as well
> as, say, the POSIX mechanism, and you can probably do much
> better.

really? can you provide an example, please.

> We need to note that with the C++ threads,
> we already have a suitable thread _object_, namely
> the thread_func which is used to run the thread.
> That didn't exist in the C API,


int pthread_create(pthread_t* thread,
                   const pthread_attr_t* attr,
                   void* (* start_routine)(void*),
                   void* arg);

"The thread is created executing
 start_routine with arg as its sole argument."

> and there was no
> visible thread object either (just a handle).

what? thread object is visible/accessible via
its handle or id. it is created dynamically
using pthread_create and is destroyed using
pthread_join or via "detach" mechanism


Boost list run by bdawes at, gregod at, cpdaniel at, john at