Message32437
The docs may be misleading - they're missing a key comment from the source code that suggests that this particular mutex is specifically for use with the single threaded event scheduler in the sched module. On the other hand, the module predates the thread module by more than a year, and the threading module by about 7 years, so it may simply have failed to keep up with the times.
The module as written definitely isn't thread-safe though (I suspect the question of whether or not it should be hasn't really come up before, as most new code just uses threading.Lock or threading.RLock for all its mutex needs). Either the code needs to change or the docs - this question would probably be best asked on python-dev (referencing this bug report). |
|
Date |
User |
Action |
Args |
2007-08-23 14:58:14 | admin | link | issue1746071 messages |
2007-08-23 14:58:14 | admin | create | |
|