Message134104
> The path which sets "pthread_version" should be inside "#ifdef
> _POSIX_THREADS".
> Also, some comments about the doc:
> - you need a "versionadded" tag
Right, fixed.
> - "use_semaphores" should explain that these semaphores are used for
> locks; also the alternative is "use mutexes and condition variables",
> not "use mutexes"
Hum, a boolean was not a good idea. I replaced this key by:
* 'lock' (string): name of the lock implementation
* 'semaphore': a lock uses a semaphore
* 'mutex+cond': a lock uses a mutex and a condition variable
I also renamed 'name' key to 'thread', so 'thread' is the name of the
*thread* implementation, and 'lock' is the name of the *lock*
implementation.
For example, test_threadsignals now uses:
-----------
USING_PTHREAD_COND = (info['thread'] == 'pthread'
and info['lock'] == 'mutex+cond')
...
@unittest.skipIf(USING_PTHREAD_COND,
'POSIX condition variables cannot be interrupted')
-----------
I think that the test is more clear than:
-----------
@unittest.skipIf(info['name'] == 'pthread' and not
info['use_semaphores'],
'POSIX mutexes cannot be interrupted')
-----------
(the message was wrong, the interrupt issue is on the condition, not on
the mutex)
> - you should not document unsupported platform names ("lwp", etc.); they
> are already disabled (#error)
Oh, I didn't realize that they were already unsupported as a compilation
error. Ok, fixed. I also removed "wince": I realized that thread_wince.h
is not used (see #11863).
The new patch (version 3) marks also PyThread_Info() as private (rename
it to _PyThread_Info). |
|
Date |
User |
Action |
Args |
2011-04-19 21:19:42 | vstinner | set | recipients:
+ vstinner, gregory.p.smith, db3l, pitrou, sable, rnk, neologix, python-dev |
2011-04-19 21:19:41 | vstinner | link | issue11223 messages |
2011-04-19 21:19:41 | vstinner | create | |
|