if {[dict get $winfo tid] ne "noop" && [thread::exists [dict get $winfo tid]]} {
if {[dict get $winfo tid] ne "noop" && [thread::exists [dict get $winfo tid]]} {
#add our client-info to existing worker thread
# add our client-info to existing worker thread
dict lappend winfo list_client_tids $tidclient
set existing_settings [get_tag_config $sourcetag]
dict set workers $sourcetag $winfo ;#writeback
if {$settingsdict eq $existing_settings} {
return [dict get $winfo tid]
#same settings - share the worker
}
dict lappend winfo list_client_tids $tidclient
dict set workers $sourcetag $winfo ;#writeback
return [dict get $winfo tid]
} else {
error "shellthread::manager::new_worker error: tag $sourcetag already has a worker with a different configuration\nexisting: $existing_settings\nattempted: $settingsdict"