Skip to content
Tcl Source Code History Of Ticket 464340ffffffffffffffffffffffffffffffffff
Login

History Of Ticket 464340ffffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 464340ffffffffffffffffffffffffffffffffff

  1. Ticket change [ca5a6b0b25] (rid 95328) by vasiljevic on 2001-09-24 09:13:17:

    1. assignee initialized to: "vasiljevic"
    2. cmimetype initialized to: "text/plain"
    3. 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.
      
      
    4. foundin initialized to: "None"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "vasiljevic"
    9. subsystem initialized to: "80. Thread Package"
    10. title initialized to: "thread::send might send to wrong interp"
    11. type initialized to: "Bug"
  2. Ticket change [2a230fe3a4] (rid 118500) by vasiljevic on 2002-01-20 07:28:38:

    1. closedate changed to: "2002-01-20T00:28:38"
    2. closer changed to: "vasiljevic"
    3. resolution changed to: "Fixed"
    4. status changed to: "Closed"