Re: sc_prim_channel::wait (was Re: nb_peek)

From: Jerome CORNET <jerome.cornet@st.com>
Date: Thu Apr 01 2010 - 04:42:44 PDT

Philipp, all,

my comments below.

On 3/31/2010 6:33 PM, Philipp A. Hartmann wrote:
>
> I think, the user should only get a grip on const event references,
> unless he/she owns them explicitly. IMHO, events returned from e.g.
> default_event() functions of a channel should NOT be modifiable.
>
> Otherwise, the user could notify() such internal events from the
> outside of the channel. This is a Bad Thing...
>

Ok, I understand now why the argument is const.

On one hand constness of the reference is a pain/illogical for the
implementation,
but on the other hand it is used in the interface to distinguish
sc_event that can be notified
from the ones that cannot (and this is the only thing that requires
const in the interface, right?).

Maybe it would be a good idea to document this explicitly in the norm,
isn't it? (even if it is
a logical consequence of the various const declarations).

"A const reference to a sc_event represent an event that can only be
waited for", etc.

Regards,

Jerome

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Thu Apr 1 04:43:21 2010

This archive was generated by hypermail 2.1.8 : Thu Apr 01 2010 - 04:43:21 PDT