[issue3582] thread_nt.c update

2009-01-19 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Note, this has been ported to py3k in http://svn.python.org/view? view=rev&rev=68543 ___ Python tracker ___ _

[issue3582] thread_nt.c update

2009-01-12 Thread Martin v. Löwis
Changes by Martin v. Löwis : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue3582] thread_nt.c update

2009-01-12 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Misc/NEWS updated in revision: 68544 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue3582] thread_nt.c update

2009-01-12 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Note, see defect 4906 for fallout caused by this checkin. ___ Python tracker ___ ___ Python-bugs-list

[issue3582] thread_nt.c update

2009-01-12 Thread Martin v. Löwis
Martin v. Löwis added the comment: Please add a Misc/NEWS entry for this change. -- assignee: -> krisvale status: closed -> open ___ Python tracker ___ _

[issue3582] thread_nt.c update

2009-01-09 Thread Martin v. Löwis
Martin v. Löwis added the comment: Windows NT (3.1, and a number of later versions) only support 64 TLS keys. Starting with Windows 2000, they added another page per thread for TLS, giving an addition 1024 TLS slots, for a total of 1088 TLS slots. FWIW, Win 9.x supported 80 TLS slots. See http:

[issue3582] thread_nt.c update

2009-01-09 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Committed this as revision: 68455 -- resolution: -> accepted status: open -> closed ___ Python tracker ___

[issue3582] thread_nt.c update

2009-01-06 Thread Ulrich Eckhardt
Ulrich Eckhardt added the comment: You're right, Kristján, sorry for the noise. Shouldn't make claims before being fully awake ___ Python tracker ___

[issue3582] thread_nt.c update

2009-01-06 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: No, the startup function for beginthreadex() must be __stdcall. From the docs: start_address Start address of a routine that begins execution of a new thread. For _beginthread, the calling convention is either __cdecl or __clrcall; for _beginthreade

[issue3582] thread_nt.c update

2009-01-06 Thread Ulrich Eckhardt
Ulrich Eckhardt added the comment: I do have an issue with the patch's startup code. The prototype for the thread entry should be "DWORD WINAPI function(PVOID);". The important distinction is the WINAPI part, which resolves to __stdcall but doesn't have to. I know that some CE targets actuall

[issue3582] thread_nt.c update

2009-01-05 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: You are right. (My dream is someday to completely get rid of this msvcrt stuff. Only pure Win32 API) ___ Python tracker ___ __

[issue3582] thread_nt.c update

2009-01-05 Thread Ulrich Eckhardt
Ulrich Eckhardt added the comment: No, CreateThread() is not a suitable replacement, because it lacks some initialisations of the C library, as explained in the MSDN: http://msdn.microsoft.com/en-us/library/ms682453(VS.85).aspx -- nosy: +eckhardt _

[issue3582] thread_nt.c update

2009-01-05 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: - Isn't CreateThread even better? - Using TLS functions is a good idea, beware though that the number of TLS slots cannot exceed 1088 on Windows. This should at least be documented. OTOH since there is only one call to PyThread_create_key in the codebase

[issue3582] thread_nt.c update

2008-08-17 Thread Kristján Valur Jónsson
New submission from Kristján Valur Jónsson <[EMAIL PROTECTED]>: Here is a suggested update to thread_nt.c. It has two significant changes: 1) it uses the new and safer _beginthreadex API to start a thread 2) it implements native TLS functions on NT, which are certain to be as fast as possible.