This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients db3l, gregory.p.smith, neologix, pitrou, python-dev, rnk, sable, vstinner
Date 2011-04-19.21:19:41
SpamBayes Score 2.3237e-12
Marked as misclassified No
Message-id <1303247977.21240.15.camel@marge>
In-reply-to <1303227723.3489.4.camel@localhost.localdomain>
> The path which sets "pthread_version" should be inside "#ifdef
> 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*

For example, test_threadsignals now uses:
USING_PTHREAD_COND = (info['thread'] == 'pthread'
                      and info['lock'] == 'mutex+cond')
                 'POSIX condition variables cannot be interrupted')

I think that the test is more clear than:
@unittest.skipIf(info['name'] == 'pthread' and not
                '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).
File name Uploaded
threading_info-3.patch vstinner, 2011-04-19.21:19:41
Date User Action Args
2011-04-19 21:19:42vstinnersetrecipients: + vstinner, gregory.p.smith, db3l, pitrou, sable, rnk, neologix, python-dev
2011-04-19 21:19:41vstinnerlinkissue11223 messages
2011-04-19 21:19:41vstinnercreate