Tryst::TaskContext(Result)
Context passed to the work block.
Constructors
Instance methods
check_message
Non-blocking check for messages from main thread. Returns the message, or nil if none. Crystal's select/else (used here) checks emptiness and receives atomically, unlike ruby-tryst's separate #empty?-then-#pop(true) - so there's no equivalent race to rescue ThreadError for. Checks @pending first.
check_pause
Check pause state, blocking while paused. A String message drained along the way is buffered onto @pending, not discarded.