Skip to content
Tcl Source Code History Of Ticket 451328ffffffffff
Login

History Of Ticket 451328ffffffffff

Artifacts Associated With Ticket 451328ffffffffff

  1. Ticket change [2c9dd1e1da] (rid 118933) by stevenashe on 2001-08-15 21:42:49:

    1. assignee initialized to: "msofer"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      Hello.
      
      Might there is a problem with Tcl_GetString[FromObj]? 
      As the code [but not the man page :-( ] indicates, the
      result is transient, pending some other call that
      changes the internal representation in the object.
      
      In a preemptive threaded environment, that "other call"
      can happen
      asynchronously, meaning that the return value from
      Tcl_GetStringFromObj is guaranteed valid at NO time
      (!);
      there is no guarantee the user can even copy the data.
      
      Either I'm being stupid, or this would seem to be
      something of
      a problem.
      
      
    4. foundin initialized to: "obsolete: 8.4a3"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "stevenashe"
    9. subsystem initialized to: "10. Objects"
    10. title initialized to: "thread problem with Tcl_GetStringFromObj"
    11. type initialized to: "Bug"
  2. Ticket change [34b2262ad3] (rid 106793) by msofer on 2001-08-16 05:22:46:

    1. assignee changed to: "andreas_kupries"
    2. subsystem changed to: "49. Threading"
  3. Ticket change [8079443a8d] (rid 116871) by andreas_kupries on 2001-08-16 08:52:18:

    1. icomment:
      Logged In: YES 
      user_id=75003
      
      Tcl follows the one thread per interp model. This
      means one thread may contain a complete hierarchy
      of interpreters, but all interpreters in that
      hierarchy may only be accessed by their thread and
      _no_ other.
      
      For Tcl_Obj's this implies that an object with a
      refcount > 1 must not be shared between interpreters
      in different threads. Else the complications
      mentioned above arise. To access some information in
      more than one thread it is necessary to duplicate the
      object in question and then transfer this unshared object 
      via an event to the other thread.
      
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  4. Ticket change [be497cb5a1] (rid 102049) by davygrvy on 2001-08-16 09:04:50:

    1. icomment:
      Logged In: YES 
      user_id=7549
      
      As Andreas says correctly, your assumption of thread safety 
      with Tcl's API is out-of-bounds with its intended design.
      
      See http://dev.scriptics.com/doc/howto/thread_model.html
      
      See the thread extension also for how to share variables 
      across threads.  You can pass Tcl_Obj pointers to threads 
      just fine.  Just don't do any operations on them.
      
      
    2. login: "davygrvy"
    3. mimetype: "text/plain"
    4. username: "davygrvy"
  5. Ticket change [ff6165a9d8] (rid 108743) by andreas_kupries on 2001-08-21 00:35:31:

    1. closedate changed to: "2001-08-20T17:35:31"
    2. closer changed to: "andreas_kupries"
    3. resolution changed to: "Invalid"
    4. status changed to: "Closed"