Overview
| Artifact ID: | fba554f66e59f39a9d59cb3364f8c64703ef5943 |
|---|---|
| Ticket: | 923072ffffffffffffffffffffffffffffffffff
atfork patch |
| User & Date: | vasiljevic on 2004-12-18 01:30:24 |
Changes
- icomment:
Logged In: YES user_id=95086 Just a life-sing.. I'm still looking into this... Aparently, the *main* problem is with the Tcl notifier thread and its handling in the child process, i.e. the fact that child has not have access to the notifier thread because it is simply not there after the fork. Attempting to lock all mutexes in master and then release them again after the fork in both master and child processes, plus re-initializing the notifier subsystem (effectively re-creating the notifier thread) in the child process is a logical way of solving this puzzle *only* if you have control of the lock hierarchy... In the nature of Tcl lib, this is not guaranteed, hence it will lead possibly (and very probably) to various deadlock-embrace situations. Also, the patch as provided, will destroy the reference count of the notifier thread which is not good but this is a minor issue which can be fixed. I see no problem in this. I do see problems in wholesale locking of Tcl mutexes though. This is the main problem and we have to see if this step is really needed and what would be the consequence of not doing it. I'm afraid some hard compromises would be required and those may/will have consequences and lead to some special-cases which would be pretty unelegant, design-wise. Well, this all requires more thinking...
- login: "vasiljevic"
- mimetype: "text/plain"
- username: "vasiljevic"