TABLE OF CONTENTS
::pwtk::propagate
USAGE
::pwtk::propagate script
DESCRIPTION
::pwtk::propagate adds the supplied script snippet to the propagate script, which is propagated to PWTK child instances. Child PWTK instances are remotes, backgrounds, threads, thread-pools, and queues.
Furthermore, ::pwtk::propagate also executes the supplied script, i.e., the whole action of ::pwtk::propagate is:
append propagate(script) $script\n uplevel 1 $script
For further details, see 5.3.7. Propagate.
ARGUMENTS
- script -- a script to append to the propagate script
SOURCE
variable propagate set l [incr propagate(level)] if { $l == 1 } { # N.B only the 1st-level propagate call should append to the # propagate script or else the higher level propagate scripts # will appear multiple times in $propagate(script) append propagate(script) $script\n } set code [catch {uplevel 1 $script} result] incr propagate(level) -1 return -code $code $result }