Message 319975 - Python tracker

Message319975

Author Tony Roberts
Recipients Tony Roberts, paul.moore, pitrou, steve.dower, tim.golden, zach.ware
Date 2018-06-19.14:54:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1529420091.77.0.56676864532.issue33895@psf.upfronthosting.co.za>
In-reply-to
Content
GetProcAddress and GetModuleHandle do block in the same way as LoadLibrary and FreeLibrary - they acquire the loader lock too.

Yes, ideally the application would terminate its threads cleanly, however when Python is embedded in another application it may not have control on when or how the threads are terminated (see original problem description).

I would be surprised if there is any code that assumes the GIL is acquired during any of those functions. When going though the code I found that sometimes the GIL was acquired when calling one of those four functions and at other times it wasn't.

See https://docs.microsoft.com/en-us/dotnet/framework/debug-trace-profile/loaderlock-mda for a (possibly incomplete) list of functions that acquire the loader lock.
History
Date User Action Args
2018-06-19 14:54:51Tony Robertssetrecipients: + Tony Roberts, paul.moore, pitrou, tim.golden, zach.ware, steve.dower
2018-06-19 14:54:51Tony Robertssetmessageid: <1529420091.77.0.56676864532.issue33895@psf.upfronthosting.co.za>
2018-06-19 14:54:51Tony Robertslinkissue33895 messages
2018-06-19 14:54:51Tony Robertscreate