From 49c376dbf60738448b0c925865d37042d96ebefd Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Wed, 29 Jun 2011 00:32:27 +0200 Subject: timer: Dispatch the whole timer in the main block. --- Timer.st | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Timer.st b/Timer.st index 0ac40fc..438d2de 100644 --- a/Timer.st +++ b/Timer.st @@ -125,7 +125,7 @@ bit difficult to do this race free.'> (Delay forSeconds: 1) wait. now := DateTime now. - self fireTimers: now. + OsmoDispatcher dispatchBlock: [self fireTimers: now]. ] ] @@ -143,7 +143,11 @@ bit difficult to do this race free.'> copy do: [:each | each timeout > now ifTrue: [^true]. sem critical: [queue remove: each]. - OsmoDispatcher dispatchBlock: [each fire]. + [ + each fire + ] on: Error do: [:e | + e logException: 'Execution of timer failed: %1' % {e tag} area: #timer. + ]. ]. ] ] -- cgit v1.2.3