Artifacts Associated With Ticket 1077210fffffffff
Ticket change [2fa6c2dc17] (rid 93094) by dgp on 2004-12-02 00:39:38:
- assignee initialized to: "msofer"
- cmimetype initialized to: "text/plain"
- comment initialized to:
All interps in all threads are sharing one value of aliasCounter with mutex protection. The aliasCounter values only need to be unique within each masterPtr->targetTable, and each of those will only be accessed by a single thread, IIUC. This means we could have a counter value for each thread (Tcl_GetThreadData) instead of using mutex.
- foundin initialized to: "None"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "dgp"
- subsystem initialized to: "20. [interp]"
- title initialized to: "revise mutex in AliasCreate"
- type initialized to: "RFE"
Ticket change [f5424aa7c9] (rid 130077) by dgp on 2004-12-02 07:46:41:
- icomment:
Logged In: YES user_id=80530 The use of the nsMutex in tclNamesp.c is very similar. so I'll mention it here rather than open another report. Again, use of a process-global counter, where per-thread (or even per-interp) would do.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [4b14dc62fd] (rid 126638) by dkf on 2004-12-02 16:25:09:
- assignee changed to: "dkf"
Ticket change [6e012d0da7] (rid 128803) by dkf on 2004-12-02 16:25:10:
- icomment:
Logged In: YES user_id=79902 Why do we have a hash table for alias targets at all? It looks to me like a deque would be the perfect data structure here (and cheaper in terms of memory too?) and that wouldn't need such a piece of mutex-protected state at all. The mutex-protected stuff in tclNamesp.c should be replaced with a per-thread counter. This is a candidate for fixing once we've got 8.5a2 out the door.
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [f92d83140a] (rid 91659) by dkf on 2004-12-02 17:50:10:
- icomment:
Logged In: YES user_id=79902 Fixed tclNamesp.c with some thread-local data magic; appears to cause no new test-suite failures.
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [fbd73cdec6] (rid 108130) by dkf on 2004-12-02 22:33:39:
- closedate changed to: "2004-12-02T15:33:39"
- closer changed to: "dkf"
- icomment:
Logged In: YES user_id=79902 It turns out that the master references could be (and should have always been) stored as linked lists instead of in a hashtable. The hashtable bought a little simplicity in one spot (the list unlinking code) at the cost of quite a lot of complexity elsewhere (general obscurity and the use of global state to issue keys!) Fixed in HEAD
- login: "dkf"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "dkf"