Software /
code /
prosody
Comparison
util/async.lua @ 8615:e77b37de482e
util.async: Behaviour change: continue to process queued items after errors
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 17 Mar 2018 14:54:48 +0000 |
parent | 8613:dbb4788db8e3 |
child | 8616:a15c891c6232 |
comparison
equal
deleted
inserted
replaced
8614:bfbafeced0c4 | 8615:e77b37de482e |
---|---|
178 self.notified_state = state; | 178 self.notified_state = state; |
179 end | 179 end |
180 local handler = self.watchers[state]; | 180 local handler = self.watchers[state]; |
181 if handler then handler(self, err); end | 181 if handler then handler(self, err); end |
182 end | 182 end |
183 if n > 0 then | |
184 return self:run(); | |
185 end | |
183 return true, state, n; | 186 return true, state, n; |
184 end | 187 end |
185 | 188 |
186 -- Add a task item to the queue without invoking the runner, even if it is idle | 189 -- Add a task item to the queue without invoking the runner, even if it is idle |
187 function runner_mt:enqueue(input) | 190 function runner_mt:enqueue(input) |