Commit graph

24 commits

Author SHA1 Message Date
Kim Alvefur
8b1b7204f5 tests: Silence [luacheck] warnings 2019-12-23 21:33:10 +01:00
Matthew Wild
bd3df4fa36 util.async: Remove async.once(), can now be replaced by runner():run(func) 2018-03-23 14:22:01 +00:00
Matthew Wild
a8f9a2757f util.async: Make parameters to async.runner() optional 2018-03-23 14:02:33 +00:00
Kim Alvefur
98482848ca util.async: Use wrapper for once runner (thanks luacheck) 2018-03-22 23:15:04 +01:00
Matthew Wild
caab5a40c2 util.async: tests: ensure async.once() propagates errors 2018-03-22 11:56:03 +00:00
Matthew Wild
c600e0f6f6 util.async: Add once() to create temporary runners 2018-03-22 07:56:01 +00:00
Matthew Wild
430eef8420 util.async: Add ready() to check whether running in async context 2018-03-22 07:46:23 +00:00
Matthew Wild
d176928882 util.async: tests: more code re-use 2018-03-19 16:40:40 +00:00
Matthew Wild
f4887f8564 util.async: tests: luacheck-clean, fixes some actual issues 2018-03-19 16:31:53 +00:00
Matthew Wild
f172b0b10d util.async: tests: remove obsolete code and comments 2018-03-19 16:25:02 +00:00
Matthew Wild
3f856fe199 util.async: tests: slight modifications to allow more code reuse in tests 2018-03-19 16:24:42 +00:00
Matthew Wild
081be0d0ed util.async: Add some more tests for wait/done 2018-03-18 22:43:06 +00:00
Matthew Wild
86ac07d8bc util.async: tests: Ensure done() can be called before wait() 2018-03-17 18:23:39 +00:00
Matthew Wild
62e076edbb util.async: tests: Add helper function to create mock watcher callbacks 2018-03-17 18:12:31 +00:00
Kim Alvefur
6dd39bd911 util.async: Trim trailing whitespace in tests [luacheck] 2018-03-17 23:00:04 +01:00
Matthew Wild
0e9588fadb util.async: tests: replace peeking at internal state with monitoring correct callback behaviour 2018-03-17 17:59:58 +00:00
Matthew Wild
fb4be1b7d5 util.async: if debugging is enabled, use runner id in logs 2018-03-17 17:29:13 +00:00
Matthew Wild
f0d4a5254e util.async: ensure change in e77b37de482e applies after out-of-loop resume also 2018-03-17 17:28:07 +00:00
Matthew Wild
3148c6b4f7 util.async: Behaviour change: continue to process queued items after errors 2018-03-17 14:54:48 +00:00
Matthew Wild
7d562e915e util.async: Yet more tests 2018-03-17 11:47:07 +00:00
Matthew Wild
a4d4661846 util.async: Ensure runner is left in correct state after out-of-main-loop error (+tests) 2018-03-16 22:26:15 +00:00
Matthew Wild
05c0a96112 util.async: Add test to ensure waiters throw an error outside async contexts 2018-03-16 22:19:33 +00:00
Matthew Wild
364f1605a8 util.async: Add tests to specifically cover error handling 2018-03-16 17:50:16 +00:00
Matthew Wild
0354f0902a util.async: Add tests 2018-03-16 17:13:57 +00:00