Artifacts Associated With Ticket 36f6f784370384e8
Ticket change [a181ce9cd0] (rid 244011) by tomkiti on 2025-08-12 19:48:35:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/x-fossil-plain"
- comment initialized to:
The "package require" command fails on Windows when loading the same package in multiple threads simultaneously: package require Thread set numThreads 100 for {set i 0} {$i < $numThreads} {incr i} { set id [::thread::create] ::thread::send -async $id "package require itcl" #after 100 ;# uncomment to pass } One possible result is: Error from thread tid0000000000009d6c can't find package itcl while executing "package require itcl" Error from thread tid0000000000001dc8 can't find package itcl while executing "package require itcl" Error from thread tid0000000000002c48 can't find package itcl while executing "package require itcl" Error from thread tid000000000000af44 can't find package itcl while executing "package require itcl" The exact number of errors varies and depends on the speed of the computer and the number of threads spawned. The error does not occur on Linux or in Tcl 8.6.16. The workaround is to add a slight delay between commands, e.g. the "after" command above. The exact delay also depends on the speed of the computer and the number of threads spawned. This can significantly slow down startup time when spawning a large number of threads and does not guarantee that the error will not occur later. - foundin initialized to: "9.0.2"
- is_private initialized to: "0"
- login: "tomkiti"
- priority initialized to: "5 Medium"
- private_contact initialized to: "1c57e67924247fd7926e89348f266c081ec57db2"
- resolution initialized to: "None"
- severity initialized to: "Important"
- status initialized to: "Open"
- submitter initialized to: "tomkiti"
- subsystem initialized to: "39. Package Manager"
- title initialized to: ""package require" is not thread-safe"
- type initialized to: "Bug"
Ticket change [a4cf142c2f] (rid 244012) by sebres on 2025-08-12 20:32:27:
- closedate changed to: "2460900.35586948"
- closer changed to: "sebres"
- foundin changed to: "8.5+"
- icomment:
Duplicate of [61c01e0edb] Shortly: it was not package require but glob.<br/> Already fixed in all versions (see the ticket).
- login: "sebres"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Duplicate"
- status changed to: "Closed"