Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | util.async tests: Explicitly import match from luassert (luacheck) | Matthew Wild | 2021-11-29 | 1 | -0/+1 |
| | |||||
* | util.async: Add next-tick configuration | Matthew Wild | 2021-11-29 | 1 | -0/+46 |
| | | | | | | | | Running woken runners in the next iteration of the event loop prevents unexpected recursion, unexpected tracebacks, and is generally more predictable. The pattern is borrowed from util.promise, where we're now doing the same. | ||||
* | util.async: Add sleep() method with configurable scheduling backend | Matthew Wild | 2021-11-29 | 1 | -0/+54 |
| | | | | | | | | | No scheduler set by default, so it will error (we plan to initialize it in util.startup). We wanted to avoid a hard dependency on util.timer (which in turn depends on network backends, etc.), and we didn't add timer.sleep() because we didn't want to add a hard dependency on util.async for things that don't need it. | ||||
* | tests: Silence [luacheck] warnings | Kim Alvefur | 2019-12-23 | 1 | -0/+2 |
| | |||||
* | util.async: Remove async.once(), can now be replaced by runner():run(func) | Matthew Wild | 2018-03-23 | 1 | -19/+0 |
| | |||||
* | util.async: Make parameters to async.runner() optional | Matthew Wild | 2018-03-23 | 1 | -0/+20 |
| | |||||
* | util.async: Use wrapper for once runner (thanks luacheck) | Kim Alvefur | 2018-03-22 | 1 | -0/+1 |
| | |||||
* | util.async: tests: ensure async.once() propagates errors | Matthew Wild | 2018-03-22 | 1 | -0/+8 |
| | |||||
* | util.async: Add once() to create temporary runners | Matthew Wild | 2018-03-22 | 1 | -0/+10 |
| | |||||
* | util.async: Add ready() to check whether running in async context | Matthew Wild | 2018-03-22 | 1 | -0/+14 |
| | |||||
* | util.async: tests: more code re-use | Matthew Wild | 2018-03-19 | 1 | -32/+20 |
| | |||||
* | util.async: tests: luacheck-clean, fixes some actual issues | Matthew Wild | 2018-03-19 | 1 | -64/+65 |
| | |||||
* | util.async: tests: remove obsolete code and comments | Matthew Wild | 2018-03-19 | 1 | -5/+0 |
| | |||||
* | util.async: tests: slight modifications to allow more code reuse in tests | Matthew Wild | 2018-03-19 | 1 | -12/+15 |
| | |||||
* | util.async: Add some more tests for wait/done | Matthew Wild | 2018-03-18 | 1 | -0/+40 |
| | |||||
* | util.async: tests: Ensure done() can be called before wait() | Matthew Wild | 2018-03-17 | 1 | -0/+18 |
| | |||||
* | util.async: tests: Add helper function to create mock watcher callbacks | Matthew Wild | 2018-03-17 | 1 | -9/+15 |
| | |||||
* | util.async: Trim trailing whitespace in tests [luacheck] | Kim Alvefur | 2018-03-17 | 1 | -26/+26 |
| | |||||
* | util.async: tests: replace peeking at internal state with monitoring correct ↵ | Matthew Wild | 2018-03-17 | 1 | -37/+68 |
| | | | | callback behaviour | ||||
* | util.async: if debugging is enabled, use runner id in logs | Matthew Wild | 2018-03-17 | 1 | -1/+1 |
| | |||||
* | util.async: ensure change in e77b37de482e applies after out-of-loop resume also | Matthew Wild | 2018-03-17 | 1 | -0/+25 |
| | |||||
* | util.async: Behaviour change: continue to process queued items after errors | Matthew Wild | 2018-03-17 | 1 | -0/+24 |
| | |||||
* | util.async: Yet more tests | Matthew Wild | 2018-03-17 | 1 | -0/+52 |
| | |||||
* | util.async: Ensure runner is left in correct state after out-of-main-loop ↵ | Matthew Wild | 2018-03-16 | 1 | -0/+23 |
| | | | | error (+tests) | ||||
* | util.async: Add test to ensure waiters throw an error outside async contexts | Matthew Wild | 2018-03-16 | 1 | -0/+5 |
| | |||||
* | util.async: Add tests to specifically cover error handling | Matthew Wild | 2018-03-16 | 1 | -0/+56 |
| | |||||
* | util.async: Add tests | Matthew Wild | 2018-03-16 | 1 | -0/+315 |