STINNER Victor <[email protected]> added the comment:
The problem is that I don't know how to check in test_threadsignals which
thread implementation is used in Python. It would be nice to have some
functions providing such information in the sys or sysconfig module, maybe
something like sys.float_info.
For example, sys._thread_info can be a dict like {'name': 'pthread',
'use_semaphore': True}.
Keys:
- name: cthread, lwp, nt, os2, pth, pthread, sgi, solaris or wince (sgi, lwp,
pth, cthread may be removed from Python 3.3: #11876)
- maxproc: max # of threads that can be started (SGI only)
- stacksize: default stacksize for a thread (lwp, pthread and os2 only)
- min_stacksize: minimum stacksize for a thread (pthread, nt and os2 only)
- max_stacksize: maximum stacksize for a thread (nt and os2 only)
thread_pthread.h contains many #ifdef which may be interesting to have in
thread_info:
- if _HAVE_BSDI is defined, don't use pthread_init()
- if THREAD_STACK_SIZE is defined, set the size of the thread stack
- if PTHREAD_SYSTEM_SCHED_SUPPORTED is defined: set scope to
PTHREAD_SCOPE_SYSTEM
- if (defined(_POSIX_SEMAPHORES) && defined(HAVE_BROKEN_POSIX_SEMAPHORES) &&
defined(HAVE_SEM_TIMEDWAIT)): use semaphore
Well, the most important informations for this issue is the name of the thread
implementation (pthread) and know if pthread semaphore are used or not.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue11223>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com