vxx2 / vlib / x / executor / errors.v
17 lines · 16 sloc · 1.03 KB · e80386b6af8a071a2e13fd654ebcdb2105fb9202
Raw
1module executor
2
3// Error strings are centralized because they are part of the public contract.
4// Keep them stable, short, and explicitly scoped to x.executor.
5const err_drain_limit_invalid = 'executor: drain limit must be positive'
6const err_executor_closed = 'executor: executor is closed'
7const err_executor_stopped = 'executor: executor is stopped'
8const err_nil_job = 'executor: job function is nil'
9const err_not_owner_thread = 'executor: current thread is not the executor owner'
10const err_owner_pump_running = 'executor: owner pump is already running'
11const err_owner_submit_wait = 'executor: owner thread cannot wait for queue capacity'
12const err_queue_full = 'executor: queue is full'
13const err_queue_size_invalid = 'executor: queue size must be positive'
14const err_timeout = 'executor: timeout'
15const err_wait_before_terminal = 'executor: wait requires a running pump or stopped executor'
16const err_wait_called = 'executor: wait was already called'
17const err_wait_owner_thread = 'executor: wait cannot be called from executor owner thread'
18