Boost logo

Boost :

From: Stefan Seefeld (seefeld_at_[hidden])
Date: 2007-03-26 13:56:49

Howard Hinnant wrote:

> Fair point. Perhaps we should go back to a more fundamental question:
> std::thread t(f);
> ...
> t.cancel(); // Logically is this a const or non-const operation on
> the thread executing t/f?
> To answer that question probably involves the very definition of
> cancellation. The "t.cancel()" can reasonably be interpreted in two
> different ways:
> 1. Owner to t: I'm no longer interested in your computation (but
> somebody else might be).
> 2. Owner to t: I want you to clean-up and stop as soon as possible.

Isn't the first point more in line with what in POSIX threads is
described by a 'detach' ? (once a thread is detached, it can't be
joined any more. It still can be canceled.


      ...ich hab' noch einen Koffer in Berlin...

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