Overview
| Artifact ID: | d750e3816b1aad9c426a7b1adea94dc86c1855f4b36ad43afeb5e34fc225b363 |
|---|---|
| Ticket: | 893f8cc5db3ba8bd6bed80ce89a0a75c6088a37c
Nested mutexes following TIP 509 |
| User & Date: | jan.nijtmans on 2025-09-20 19:12:40 |
Changes
- icomment:
I re-implemented everything in tclUnixThrd.c, with the following idea: What if we let "counter" only count the additional locks after the first one in a thread. Then we only update "counter" when we already have the lock, so we don't have to worry about it doing it atomic. It makes things much simpler. Also, as long as the mutex is only used non-recursive, the "counter" will always be 0. Windows not updated yet, so don't look there ;-) This way, it is also easier to follow the possible race conditions, I don't think there are anymore.
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"