[cpp-threads] RE: Initial comments on your straw man

Ben Hutchings ben at decadentplace.org.uk
Wed Feb 22 02:00:07 GMT 2006


Clark Nelson wrote:
<snip>
> > For other people, the model is where the calling function schedules
> > f() and g() in separate threads, and then suspends itself waiting
> > for them to finish, whereupon it adds the results.  Very natural,
> > if you are thinking parallel, and it meets the wording of C and C++,
> > but does not serialise the calls.
> 
> Fine, but what about my proposed wording: "The execution of the called
> function is sequenced before any further operation of the calling
> function."

This seems to require that a function call is executed immediately once
the function address and function arguments have been evaluated, which
would be a new and unreasonable requirement.

> I was waving my hands a little bit there -- I did disclaim that I had
> produced polished standardese -- but the intention is certainly that
> "any further operation of the calling function" includes invoking any
> other function.

How about: "For any given function call, each evaluation or side effect
of the calling function and of any other functions it may call is
executed either before or after all evaluations or side effects of the
called function."

-- 
Ben Hutchings
It is easier to write an incorrect program than to understand a correct one.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://www.decadentplace.org.uk/pipermail/cpp-threads/attachments/20060222/3f8df31c/attachment.pgp


More information about the cpp-threads mailing list