diff options
author | kjnash <k.j.nash@usa.net> | 2023-12-05 11:55:14 (GMT) |
---|---|---|
committer | kjnash <k.j.nash@usa.net> | 2023-12-05 11:55:14 (GMT) |
commit | 704807694af4a1b60cb2d166f3c52c69a35b474f (patch) | |
tree | ec76839d0f1ce82038a643335edfc7b87c873da8 /library | |
parent | 0a97f6d1c55f4158bafd1539dc1b20cce6188857 (diff) | |
download | tcl-704807694af4a1b60cb2d166f3c52c69a35b474f.zip tcl-704807694af4a1b60cb2d166f3c52c69a35b474f.tar.gz tcl-704807694af4a1b60cb2d166f3c52c69a35b474f.tar.bz2 |
Define http(usingThread) more precisely
Diffstat (limited to 'library')
-rw-r--r-- | library/http/http.tcl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/library/http/http.tcl b/library/http/http.tcl index 6c3c068..da345e3 100644 --- a/library/http/http.tcl +++ b/library/http/http.tcl @@ -5293,13 +5293,17 @@ proc http::socket {args} { # value 1 => operate as if -threadlevel 0 # value 2 => error return # +# The command assigns a value to http(usingThread), which records whether +# command http::socket can use a separate thread. +# # Arguments: none # Return Value: none # ------------------------------------------------------------------------------ proc http::LoadThreadIfNeeded {} { variable http - if {$http(usingThread) || ($http(-threadlevel) == 0)} { + if {$http(-threadlevel) == 0} { + set http(usingThread) 0 return } if {[catch {package require Thread}]} { @@ -5308,6 +5312,7 @@ proc http::LoadThreadIfNeeded {} { but the Thread package is not available} return -code error $msg } + set http(usingThread) 0 return } set http(usingThread) 1 |