Overview
| Artifact ID: | 841375291c9054ada0d8b359e0abea3bdbaff363 |
|---|---|
| Ticket: | 3301634fffffffffffffffffffffffffffffffff
Thread release crash |
| User & Date: | vasiljevic on 2011-08-18 22:59:59 |
Changes
- icomment:
Releasing the main thread is syntactically possible and wrong. Actually releasing the 'current' thread ie. one calling the thread::release should be disabled or just a no-op'ed. I never thought of that as this is rarely practically done. Releasing (i.e. letting it die away) any thread is always connected with various cleanups that may go astray in certain situations. For example, you lock a mutex in a thread and then release the thread. Moreover, the Tcl lib was initially not desiged for thread safety. It is added some years later. So the entire cleanup/finalize machinery is not very thread-friendly and still assumes a "main" thread (the one that started the program) is always arround. So.,, you never exit a "main" thread (whichever that is) and I will add a block that will effectively no-op the release of the 'self' i.e current thread (as explained above). Cheers Zoran
- login: "vasiljevic"
- mimetype: "text/plain"
- username: "vasiljevic"