Artifacts Associated With Ticket 451328ffffffffff
Ticket change [2c9dd1e1da] (rid 118933) by stevenashe on 2001-08-15 21:42:49:
- assignee initialized to: "msofer"
- cmimetype initialized to: "text/plain"
- 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.
- foundin initialized to: "obsolete: 8.4a3"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "stevenashe"
- subsystem initialized to: "10. Objects"
- title initialized to: "thread problem with Tcl_GetStringFromObj"
- type initialized to: "Bug"
Ticket change [34b2262ad3] (rid 106793) by msofer on 2001-08-16 05:22:46:
- assignee changed to: "andreas_kupries"
- subsystem changed to: "49. Threading"
Ticket change [8079443a8d] (rid 116871) by andreas_kupries on 2001-08-16 08:52:18:
- 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.
- login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"
- icomment:
Ticket change [be497cb5a1] (rid 102049) by davygrvy on 2001-08-16 09:04:50:
- 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.
- login: "davygrvy"
- mimetype: "text/plain"
- username: "davygrvy"
- icomment:
Ticket change [ff6165a9d8] (rid 108743) by andreas_kupries on 2001-08-21 00:35:31:
- closedate changed to: "2001-08-20T17:35:31"
- closer changed to: "andreas_kupries"
- resolution changed to: "Invalid"
- status changed to: "Closed"