Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

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

#14

Patch at http://dl.dropbox.com/u/5836407/Patches/Psycopg2/0004-Use-pthread_s...

Helps to identify the active thread in the debug logs

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

State: invalid
Milestone: none
Assigned to: nobody

Activity

  1. Daniele Varrazzo
    Daniele Varrazzo
    • 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.

    November 13th, 2010 @ 03:06 AM

  2. Daniele Varrazzo
    Daniele Varrazzo
    • Tag changed from patch debug to debug, patch

    December 22nd, 2010 @ 02:06 AM