mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-05-01 20:33:43 +00:00
20 lines
396 B
C
20 lines
396 B
C
#include "uwsgi_python.h"
|
|
|
|
extern struct uwsgi_server uwsgi;
|
|
extern struct uwsgi_python up;
|
|
|
|
void gil_real_get() {
|
|
PyEval_AcquireLock();
|
|
PyThreadState_Swap((PyThreadState *) pthread_getspecific(up.upt_save_key));
|
|
}
|
|
|
|
void gil_real_release() {
|
|
pthread_setspecific(up.upt_save_key, (void *) PyThreadState_Swap(NULL));
|
|
PyEval_ReleaseLock();
|
|
}
|
|
|
|
|
|
|
|
void gil_fake_get() {}
|
|
void gil_fake_release() {}
|