This project is archived and is in readonly mode.
[PATCH] Use pthread_self() instead of getpid() in Dprintf
Reported by Jean-Baptiste Quenot | November 12th, 2010 @ 11:00 AM
Patch at http://dl.dropbox.com/u/5836407/Patches/Psycopg2/0004-Use-pthread_s...
Helps to identify the active thread in the debug logs
Comments and changes to this ticket
-
Daniele Varrazzo November 13th, 2010 @ 03:06 AM
- State changed from new to invalid
- Tag set to patch debug
Thank you, but I am reluctant to apply this patch because:
1. it doesn't work on Windows:pthread_self
must be #defined toGetCurrentThreadId
. I don't know about OSX.
2.pthread_t
is not a pointer: it is an opaque structure only supposed to be compared bypthread_equal
. See this and this. So just casting it to a void* doesn't seem portable. -
Daniele Varrazzo December 22nd, 2010 @ 02:06 AM
- Tag changed from patch debug to debug, patch
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
<b>WARNING:</b> the informations in this tracker are archived. Please submit new tickets or comments to <a href="https://github.com/psycopg/psycopg2/issues">the new tracker</a>.
<br/>
Psycopg is the most used PostgreSQL adapter for the Python programming language. At the core it fully implements the Python DB API 2.0 specifications. Several extensions allow access to many of the features offered by PostgreSQL.