This project is archived and is in readonly mode.

#14 ✓invalid
Jean-Baptiste Quenot

[PATCH] Use pthread_self() instead of getpid() in Dprintf

Reported by Jean-Baptiste Quenot | November 12th, 2010 @ 11:00 AM

Patch at

Helps to identify the active thread in the debug logs

Comments and changes to this ticket

  • Daniele Varrazzo

    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 to GetCurrentThreadId. I don't know about OSX.
    2. pthread_t is not a pointer: it is an opaque structure only supposed to be compared by pthread_equal. See this and this. So just casting it to a void* doesn't seem portable.

  • Daniele Varrazzo

    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="">the new tracker</a>.
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.

Shared Ticket Bins

People watching this ticket