[Python-checkins] CVS: python/dist/src/Python thread_pthread.h,2.30,2.30.6.1
Anthony Baxter
anthonybaxter@users.sourceforge.net
Sat, 22 Dec 2001 20:07:27 -0800
- Previous message: [Python-checkins] CVS: python/dist/src/Lib ftplib.py,1.53.2.1,1.53.2.2 gopherlib.py,1.9,1.9.4.1 httplib.py,1.34.2.1,1.34.2.2 imaplib.py,1.27.4.1,1.27.4.2 nntplib.py,1.26,1.26.4.1 poplib.py,1.14,1.14.4.1 smtplib.py,1.36,1.36.4.1 socket.py,1.11.2.1,1.11.2.2 telnetlib.py,1.11,1.11.4.1
- Next message: [Python-checkins] CVS: python/dist/src acconfig.h,1.46.2.2,1.46.2.3 config.h.in,2.91.2.5,2.91.2.6 configure,1.207.2.5,1.207.2.6 configure.in,1.215.2.5,1.215.2.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Python
In directory usw-pr-cvs1:/tmp/cvs-serv16386/Python
Modified Files:
Tag: release21-maint
thread_pthread.h
Log Message:
backport of solaris thread patch, adding PTHREAD_SCOPE_SYSTEM support:
Improve threading on Solaris, according to SF patch #460269, submitted
by bbrox@bbrox.org / lionel.ulmer@free.fr.
This adds a configure check and if all goes well turns on the
PTHREAD_SCOPE_SYSTEM thread attribute for new threads.
This should remove the need to add tiny sleeps at the start of threads
to allow other threads to be scheduled.
This is a semi-feature, but makes such a huge difference to the
performance of Zope on Solaris that it's worthwhile (well, imho).
Index: thread_pthread.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/thread_pthread.h,v
retrieving revision 2.30
retrieving revision 2.30.6.1
diff -C2 -d -r2.30 -r2.30.6.1
*** thread_pthread.h 2000/09/01 23:29:28 2.30
--- thread_pthread.h 2001/12/23 04:07:25 2.30.6.1
***************
*** 130,135 ****
--- 130,142 ----
int success;
dprintf(("PyThread_start_new_thread called\n"));
+ #ifdef PTHREAD_SYSTEM_SCHED_SUPPORTED
+ pthread_attr_t attrs;
+ #endif
if (!initialized)
PyThread_init_thread();
+ #ifdef PTHREAD_SYSTEM_SCHED_SUPPORTED
+ pthread_attr_init(&attrs);
+ pthread_attr_setscope(&attrs, PTHREAD_SCOPE_SYSTEM);
+ #endif
success = pthread_create(&th,
***************
*** 147,151 ****
--- 154,162 ----
arg
#elif defined(PY_PTHREAD_STD)
+ #ifdef PTHREAD_SYSTEM_SCHED_SUPPORTED
+ &attrs,
+ #else
(pthread_attr_t*)NULL,
+ #endif
(void* (*)(void *))func,
(void *)arg
- Previous message: [Python-checkins] CVS: python/dist/src/Lib ftplib.py,1.53.2.1,1.53.2.2 gopherlib.py,1.9,1.9.4.1 httplib.py,1.34.2.1,1.34.2.2 imaplib.py,1.27.4.1,1.27.4.2 nntplib.py,1.26,1.26.4.1 poplib.py,1.14,1.14.4.1 smtplib.py,1.36,1.36.4.1 socket.py,1.11.2.1,1.11.2.2 telnetlib.py,1.11,1.11.4.1
- Next message: [Python-checkins] CVS: python/dist/src acconfig.h,1.46.2.2,1.46.2.3 config.h.in,2.91.2.5,2.91.2.6 configure,1.207.2.5,1.207.2.6 configure.in,1.215.2.5,1.215.2.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]