Boost logo

Boost :

From: David Abrahams (abrahams_at_[hidden])
Date: 2000-08-09 01:28:33


----- Original Message -----
From: "Valentin Bonnard" <Bonnard.V_at_[hidden]>

>
> brick-/tmp $ cat except.cc
> #include <iostream>
> #include <unistd.h>
>
> int main ()
> {
> try {
> struct T {
> ~T () { sleep (2); }
> } x;
> std::cout << "Will throw now.\n";
> throw 0;
> } catch (int) {
> std::cout << "Catched !\n";
> }
> }
> brick-/tmp $ g++ except.cc
>
> What happens in the following case:
>
> brick-/tmp $ ./a.out & ./a.out
> [1] 15688
> Will throw now.
> Will throw now.
> Catched !
> [1] + done ./a.out
> Catched !
> brick-/tmp $
>
> Answer: nothing special.
>
> The standard library has to be somewhat MT-compatible to write
> any MT code !

There are no threads in your example; these are processes AFAICT. Processes
occur at a lower level of granularity than programs (which the standard
deals with). Threads occur at a higher level of granularity than programs,
which is why they could easily have impact on the language standard.

-Dave


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