Aurélien Gâteau wrote:
Vadim Lebedev a écrit :
Second, even if we have one thread per timer, why do you need to
create it
in the constructor? and then stop/restart it in the start(..) method?
I often find it easier to maintain if members of a class are always
allocated, rather than created and deleted on demand. You also need
to know that instantiating a PrivateThread won't create any thread.
The real thread will actually be created in the start() method,
which instantiate a boost::thread().
Ah, i see,
but in that case why don't use embedded object and avoid new/delete
stuff alltogether?
It avoids moving the code of the PrivateThread class in the .h file.
This is some kind of Pimpl idiom. It allows heavy changes to the
PrivateThread class without touching the Timer.h file. This saves
quite a lot of recompilation.
Ok, i see....
Now THE question:
It appears that some(good or bad) reason the original Timer class was
able to (mis-)handle
multiple active timeouts. :)
Your version obviously is not doing that... So is this multi-timeout
capability
is used by wengophone?
Vadim
_______________________________________________
Wengophone-devel mailing list
Wengophone-devel@lists.openwengo.com
http://dev.openwengo.com/mailman/listinfo/wengophone-devel