xotcl::THREAD instproc destroy

 <instance of xotcl::THREAD[i]> destroy

Defined in

Testcases:
thread_destroy_after_cache_cleanup, xotcl-request-monitor
Source code:
:log "destroy called"
if {!${:persistent} &&
    [nsv_exists [self class] [self]]} {
  set tid [nsv_get [self class] [self]]
  set refcount [::thread::release $tid]
  :log "destroying thread object tid=$tid cnt=$refcount"
  if {$refcount == 0} {
    :log "thread terminated"
    nsv_unset [self class] [self]
    ns_mutex destroy ${:mutex}
    ns_log notice "mutex ${:mutex} destroyed"
  }
}
next
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: