Permalink
Browse files

fix subtle concurrency bug between cancelling a timer and schedule-re…

…curring
  • Loading branch information...
nathanmarz committed Dec 25, 2011
1 parent 3bc27e3 commit e1eb16b3783bbcda9d2b83f7b1224a51c00e5e62
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/clj/backtype/storm/timer.clj
@@ -76,8 +76,8 @@
(defn cancel-timer [timer]
(check-active! timer)
- (reset! (:active timer) false)
(locking (:lock timer)
+ (reset! (:active timer) false)
(.interrupt (:timer-thread timer)))
(.acquire (:cancel-notifier timer)))

0 comments on commit e1eb16b

Please sign in to comment.