nsshell::THREAD method do (public)

 <instance of nsshell::THREAD[i]> do cmd

Defined in /usr/local/ns/tcl/nsshell/shell.tcl

ns_log notice "THREAD [self] received <$cmd>"

Parameters:
cmd

Partial Call Graph (max 5 caller/called nodes):
%3 thread::create thread::create thread::mutex thread::mutex thread::send thread::send nsshell::THREAD instproc do nsshell::THREAD instproc do nsshell::THREAD instproc do->thread::create nsshell::THREAD instproc do->thread::mutex nsshell::THREAD instproc do->thread::send

Testcases:
No testcase defined.
Source code:
if {![nsv_exists [current class] [self]]} {
    #
    # lazy creation of a new slave thread
    #
    thread::mutex lock ${:mutex}
    if {![nsv_exists [current class] [self]]} {
        set :tid [::thread::create]
    }
    nsv_set [current class] [self${:tid}

    set initcmd ${:initCmd}
    ::thread::send ${:tid} $initcmd
    set :tid [nsv_get [current class] [self]]
    thread::mutex unlock ${:mutex}
} else {
    #
    # slave thread is already up and running
    #
    set :tid [nsv_get [current class] [self]]
}
ns_log notice "calling [current class] (${:tid}, [pid]) $cmd"
thread::send ${:tid} $cmd
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: