mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 03:20:18 +00:00
...
This commit is contained in:
parent
f7c12ec213
commit
8f5f3f43c2
@ -40,7 +40,7 @@
|
||||
/*******************************************************************************/
|
||||
|
||||
#if PK_ENABLE_THREAD
|
||||
#define THREAD_LOCAL thread_local
|
||||
#define PK_THREAD_LOCAL thread_local
|
||||
#include <mutex>
|
||||
|
||||
struct GIL {
|
||||
@ -48,10 +48,10 @@ struct GIL {
|
||||
explicit GIL() { _mutex.lock(); }
|
||||
~GIL() { _mutex.unlock(); }
|
||||
};
|
||||
#define PK_GLOBAL_SCOPE_LOCK() auto _lock = GIL();
|
||||
#define PK_GLOBAL_SCOPE_LOCK() GIL _lock();
|
||||
|
||||
#else
|
||||
#define THREAD_LOCAL
|
||||
#define PK_THREAD_LOCAL
|
||||
#define PK_GLOBAL_SCOPE_LOCK()
|
||||
#endif
|
||||
|
||||
|
@ -742,7 +742,7 @@ PyObject* VM::vectorcall(int ARGC, int KWARGC, bool op_call){
|
||||
ArgsView args(p1 - ARGC - int(method_call), p1);
|
||||
ArgsView kwargs(p1, s_data._sp);
|
||||
|
||||
static THREAD_LOCAL PyObject* buffer[PK_MAX_CO_VARNAMES];
|
||||
static PK_THREAD_LOCAL PyObject* buffer[PK_MAX_CO_VARNAMES];
|
||||
|
||||
if(is_non_tagged_type(callable, tp_native_func)){
|
||||
const auto& f = PK_OBJ_GET(NativeFunc, callable);
|
||||
|
Loading…
x
Reference in New Issue
Block a user