Boost logo

Boost :

Subject: Re: [boost] Synchronization (RE: [compute] review)
From: Gruenke,Matt (mgruenke_at_[hidden])
Date: 2014-12-31 14:32:37


-----Original Message-----
From: Boost [mailto:boost-bounces_at_[hidden]] On Behalf Of Thomas M
Sent: December 31, 2014 12:11
To: boost_at_[hidden]
Subject: Re: [boost] Synchronization (RE: [compute] review)

> On 31/12/2014 12:51, Thomas M wrote:

> If the guarantee can be "moved outside of the loop" to avoid the blocking,
> something like:

It was always my intention that they be movable, setable, and default-constructable. That should allow an array (or scoped_array<>, if the size isn't known until runtime) to be defined outside the loop and initialized inside.

> then it's not a guarantee in your sense any more, because I can obviously also
> move it out to any improper scope loosing the protection.

It's still a guarantee - just not necessarily a guarantee of what you want. It guarantees that the event will complete within *its* lifetime. And yes, making it movable and setable opens the door to misuse, but the simplest and most natural way to use it is still the correct way.

I feel like this issue has been receiving a disproportionate amount of focus. Most users of Boost.Compute will probably never use one of these constructs. Also, no one has yet closed the door to wait_list- or command_queue- level equivalents. I'm simply not going to write them. And even if they aren't eventually added to the library, you can still define them in your own code.

Honestly, I'm much more concerned about #2. While we argue over levels of convenience, that looming issue of exception safety still casts a long, dark shadow over the high level interface of Boost.Compute and its users.

Matt

________________________________

This e-mail contains privileged and confidential information intended for the use of the addressees named above. If you are not the intended recipient of this e-mail, you are hereby notified that you must not disseminate, copy or take any action in respect of any information contained in it. If you have received this e-mail in error, please notify the sender immediately by e-mail and immediately destroy this e-mail and its attachments.


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