Overview
| Artifact ID: | ca5a6b0b25aa715e278c8cdfc5cca236f60b5208 |
|---|---|
| Ticket: | 464340ffffffffffffffffffffffffffffffffff
thread::send might send to wrong interp |
| User & Date: | vasiljevic on 2001-09-24 09:13:17 |
Changes
- assignee changed to: "vasiljevic"
- cmimetype changed to: "text/plain"
- comment changed 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 changed to: "None"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "vasiljevic"
- subsystem changed to: "80. Thread Package"
- title changed to: "thread::send might send to wrong interp"
- type changed to: "Bug"