Author serhiy.storchaka
Recipients pitrou, serhiy.storchaka
Date 2013-01-06.18:10:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In-reply-to <>
> I don't understand what you're gaining with this complicated class: your
> class guarantees that the sleepers will be woken up, but it doesn't
> guarantee that any user code will actually run.

It guarantees that advance() returns only when all sleepers are sleeping or 
died, and all user code before specified time mark have executed. User code 
running does not take time, only sleeps take time. Actually this class is a 
forward-running time-machine with pause. But it looks overkill here.

> Perhaps the whole thing would be simpler if your tests used a Queue
> instead of a list?

Hmm, I had not occurred to this idea. Indeed, the patch is a little 
complicated (honestly speaking, it is a lot complicated). Here is a more 
simplified patch that uses a queue for synchronization in one direction and 
simple custom timer for synchronization in another direction. Thank you for 
File name Uploaded
test_sched_queue.patch serhiy.storchaka, 2013-01-06.18:10:43
Date User Action Args
2013-01-06 18:10:44serhiy.storchakasetrecipients: + serhiy.storchaka, pitrou
2013-01-06 18:10:44serhiy.storchakalinkissue16843 messages
2013-01-06 18:10:44serhiy.storchakacreate