Am 22.02.2024 um 10:10 schrieb Олег Н.:
Hi, all.
Can anybody explain why first call of thread::create makes 2 system threads instead of one?
For example, we have t.tcl script:
~$ cat t.tcl
#!/usr/bin/tclsh
package require Thread
puts "stage1"
after 10000
thread::create {thread::wait}
puts "stage2"
after 10000
thread::create {thread::wait}
puts "stage3"
after 10000
We run it. And check system threads on every stage change:
~$ ps -aL | grep t.tcl
8134 8134 pts/2 00:00:00 t.tcl
~$ ps -aL | grep t.tcl
8134 8134 pts/2 00:00:00 t.tcl
8134 8372 pts/2 00:00:00 t.tcl
8134 8373 pts/2 00:00:00 t.tcl
~$ ps -aL | grep t.tcl
8134 8134 pts/2 00:00:00 t.tcl
8134 8372 pts/2 00:00:00 t.tcl
8134 8373 pts/2 00:00:00 t.tcl
8134 8605 pts/2 00:00:00 t.tcl
Hi Oleg,
what is your platform? If it is linux, which threadding system was
compiled in (pthreads) (found by the configure script).
Take care,
Harald
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)