| 1 | module async |
| 2 | |
| 3 | // Error strings are centralized because they form the observable contract for |
| 4 | // callers and tests. Keep them short, stable, and explicit about whether the |
| 5 | // failure came from x.async or from the parent context. |
| 6 | const err_group_go_after_wait = 'async: group does not accept new tasks after wait starts' |
| 7 | const err_group_wait_called = 'async: group wait was already called' |
| 8 | const err_interval_invalid = 'async: interval must be positive' |
| 9 | const err_nil_job = 'async: job function is nil' |
| 10 | const err_pool_closed = 'async: pool is closed' |
| 11 | const err_pool_queue_full = 'async: pool queue is full' |
| 12 | const err_pool_queue_size_invalid = 'async: pool queue size must be positive' |
| 13 | const err_pool_wait_called = 'async: pool wait was already called' |
| 14 | const err_pool_workers_invalid = 'async: pool worker count must be positive' |
| 15 | const err_task_wait_called = 'async: task wait was already called' |
| 16 | const err_timeout = 'async: timeout' |
| 17 | |
| 18 | const context_canceled = 'context canceled' |
| 19 | |
| 20 | // The current context module exposes deadline expiry as an IError with this |
| 21 | // message. x.async normalizes that specific deadline error to `async: timeout`. |
| 22 | const context_deadline_exceeded = 'context deadline exceeded' |
| 23 | |