Ns eval
Jump to navigation
Jump to search
Man page: http://aolserver.com/docs/tcl/ns_eval.html
NAME
- ns_eval - Evaluate tcl in multiple interpreters
SYNOPSIS
- ns_eval ?-sync? ?-pending? ?args?
DESCRIPTION
- This command causes args to be sourced as a script in all Tcl interpreters for the current virtual server. Normally, the ns_eval is asynchronous and the script isn't immediately evaluated in the other interpreters until their next atalloc event. If the -sync option is specified, ns_eval blocks until all servers have executed the script.
- The -pending flag, which cannot be specified with any other flags or args, returns a list of the scritps still waiting to be evaluated in the various interpreters.
- NOTE: This command is currently implemented in Tcl, in the source file nsd/init.tcl.
EXAMPLES
# Set a global variable accessible from all interpreters ns_eval set myGlobal 1
# Create a proc accessible from all interpreters, and wait # for it to be define in all of them before returning ns_eval -sync proc doSomething {args} { # do something }
# Get the list of pending scripts to be eval'd ns_eval -pending
SEE ALSO