coroprobe
coroprobe coroName cmd ?arg ...?
Runs a command now in a suspended coroutine, in the place where it waits, and gives its result. The coroutine stays suspended, and the next resume goes on as before.
Examples
coroutine c apply {{} {set n 5; yield; return $n}}; coroprobe c set ngives5
Errors
coroprobe nope set xgives the errorcan only inject a probe command into a coroutine
Facts
- Capability: none.
- Compute cost: one compute unit for the call, and more for the commands that it runs.
- Release: Tcl 9.1 only. A script has the command when ztcl follows Tcl 9.1, with
--tcl 9.1. See Tcl 9.1.