Artifacts Associated With Ticket 464340ffffffffffffffffffffffffffffffffff
Ticket change [ca5a6b0b25] (rid 95328) by vasiljevic on 2001-09-24 09:13:17:
- assignee initialized to: "vasiljevic"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Consider: set script { package require Thread set worker [thread::create { proc evaluate {cbThread script cbScript} { thread::send $cbThread\ [list $cbScript [thread::id] [eval $script]] } thread::wait }] proc callback {thread value} { set ::continue {} } thread::send -async $worker \ "evaluate [thread::id] list callback" vwait ::continue puts "$worker done" } set interp1 [interp create] $interp1 eval $script set interp2 [interp create] $interp2 eval $script The interp1 evaluation works fine. The interp2 evaluation blocks indefinitely. This is because the callback is executed in the wrong interpreter. The threading extension evaluates callbacks always in the main interpreter i.e. one which was active when the thread was started. Thanks for Jean-Luc Fontaine for pointing this out. - foundin initialized to: "None"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "vasiljevic"
- subsystem initialized to: "80. Thread Package"
- title initialized to: "thread::send might send to wrong interp"
- type initialized to: "Bug"
Ticket change [2a230fe3a4] (rid 118500) by vasiljevic on 2002-01-20 07:28:38:
- closedate changed to: "2002-01-20T00:28:38"
- closer changed to: "vasiljevic"
- resolution changed to: "Fixed"
- status changed to: "Closed"