How do I cancel a timer?
james at mansionfamily.plus.com
Fri Dec 19 07:12:51 CET 2008
ryah dahl wrote:
> The mistake checking you want could be added with very much overhead
That's not necessarily true. Just have a signal byte at a known offset
and require it to be 0 to
do the initialisation, and the initialisationn will change the signal.
This is low overhead on
users and runtime - but it IS an API change. To say its not possible in
general is wrong, though.
And, to be honest, having an *optional*check that looks in memory and
says 'if it looks initialised,
then it IS in itialised' and accepts a probabilistic false positive, is
also cheap and unlikely
to be a problem in reality while catching a class of bug. (Though, you
might want to increase
the size of the structure slightly to have a magic flag - 64 bits or so
More information about the libev