This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author anthonypjshaw
Recipients anthonypjshaw, dgelessus
Date 2019-05-11.06:03:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1557554628.77.0.780921202288.issue36880@roundup.psfhosted.org>
In-reply-to
Content
The documentation says:

>>
Note Make sure you keep references to CFUNCTYPE() objects as long as they are used from C code. ctypes doesn’t, and if you don’t, they may be garbage collected, crashing your program when a callback is made.
Also, note that if the callback function is called in a thread created outside of Python’s control (e.g. by the foreign code that calls the callback), ctypes creates a new dummy Python thread on every invocation. This behavior is correct for most purposes, but it means that values stored with threading.local will not survive across different callbacks, even when those calls are made from the same C thread.

But that doesn't describe the situation you've shared. I'll continue to look into the ctypes module
History
Date User Action Args
2019-05-11 06:03:48anthonypjshawsetrecipients: + anthonypjshaw, dgelessus
2019-05-11 06:03:48anthonypjshawsetmessageid: <1557554628.77.0.780921202288.issue36880@roundup.psfhosted.org>
2019-05-11 06:03:48anthonypjshawlinkissue36880 messages
2019-05-11 06:03:48anthonypjshawcreate