mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-22 01:54:09 +01:00
schedule: Move the whole deletion of an event in the same critical section.
This commit is contained in:
parent
8ec9f1b496
commit
9e74175566
@ -136,8 +136,7 @@ class Schedule(drivers.IrcDriver):
|
||||
while self.schedule and self.schedule[0][0] < time.time():
|
||||
with self.lock:
|
||||
(t, name, args, kwargs) = heapq.heappop(self.schedule)
|
||||
f = self.events[name]
|
||||
del self.events[name]
|
||||
f = self.events.pop(name)
|
||||
try:
|
||||
f(*args, **kwargs)
|
||||
except Exception as e:
|
||||
|
Loading…
Reference in New Issue
Block a user