gh-127065: Make methodcaller thread-safe and re-entrant (GH-127746)
The function `operator.methodcaller` was not thread-safe since the additional of the vectorcall method in gh-89013. In the free threading build the issue is easy to trigger, for the normal build harder. This makes the `methodcaller` safe by: * Replacing the lazy initialization with initialization in the constructor. * Using a stack allocated space for the vectorcall arguments and falling back to `tp_call` for calls with more than 8 arguments.
P
Pieter Eendebak committed
b0f278ff0551b06191cec01445c577e3b25570da
Parent: 5a23994
Committed by GitHub <noreply@github.com>
on 12/11/2024, 3:06:07 PM