- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
Class Relations
::xotcl::Object create ::xo::broadcast
Methods (to be applied on the object)
blueprint (scripted)
foreach t [::xotcl::THREAD info instances] { $t do eval $cmd } ns_eval ${cmd}\n::xo::at_cleanup
clear (scripted)
catch {nsv_unset broadcast [ns_thread id]}
receive (scripted)
set tid [ns_thread id] if {[nsv_exists broadcast $tid]} { foreach cmd [nsv_get broadcast $tid] { ns_log notice "broadcast received {$cmd}" try { eval $cmd } on error {errorMsg} { ns_log notice "broadcast receive error: $errorMsg for cmd $cmd" } } :clear }
send (scripted)
set tids {} foreach thread_info [ns_info threads] { set tn [lindex $thread_info 0] set tid [lindex $thread_info 2] dict set tids $tid 1 if { [info exists thread_pattern] && ![string match $thread_pattern $tn] } { continue } switch -glob -- $tn { -conn:* - -sched:* { nsv_lappend broadcast $tid $cmd } } } foreach tid [nsv_array names broadcast] { if {![dict exists $tids $tid]} { nsv_unset broadcast $tid ns_log notice "xo::broadcast cleanup of TID $tid (thread does not exist anymore)" } }
- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables