Boost logo

Boost :

From: scleary_at_[hidden]
Date: 2000-08-04 12:46:03


> I'm also
> unaware of any problems specifically with critical sections being
> statically initialized under Win32.

Under pthreads, you can do:
  pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER;
Under Win32, there's no such thing.

> . . . but unless
> there's a language change then static initialization is problematic
> at best any way, since there's no gaurantee about the order or
> concurrency requirements of using static data with multiple threads.

All static initialization is done before dynamic initialization (and
therefore before any threads could be created).

> Regardless, I don't see how any of this applies here, since neither
> library need be used for the implementation details here. (Not that
> I'm saying they shouldn't or won't be...).
>
> The mutex, especially, need not rely on any underlying support from
> another thread library in it's implementation. If we're to devise a
> proper library we may need to ignore the existance of other threading
> libraries. Yes, the implications you mention need to be discussed
> thoroughly, but that's precisely what I'm trying to get started here.

Um. . . if you're talking about doing an entire user-level thread library,
then you've got quite a project ahead of you. I was thinking of something
more along the lines of a thin-as-possible wrapper over Win32, pthreads,
etc.

        -Steve


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk