Charles-François Natali <neolo...@free.fr> added the comment:

> I think I got it: pthread_setaffinity_np() does not crash.

Nice.
Out of curiosity, I just looked at the source code, and it just does 
sched_setaffinity(thread->tid), so you can do the same with 
sched_setaffinity(syscall(SYS_gettid)) for the current thread.
However, I don't think we should/could add this to the posix module: it expects 
a pthread_t instead of a PID, to which we don't have access.
Furthermore, even though we're linked with pthread, this should normally 
succeed - or at least not crash - when called from the main thread - and it 
does on my Debian squeeze box.
So I'd suggest closing this issue.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12936>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to