mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-02-05 17:28:23 +08:00
support GIL_ENTER when vm_cnt goto 0
This commit is contained in:
parent
16f55887c3
commit
4e99de0b4c
@ -3006,11 +3006,9 @@ PIKA_RES _do_pika_eventListener_send(PikaEventListener* self,
|
||||
/* using multi thread */
|
||||
if (pika_GIL_isInit()) {
|
||||
/* python thread is running */
|
||||
if (g_PikaVMState.vm_cnt != 0) {
|
||||
/* wait python thread get first lock */
|
||||
while (!_VM_is_first_lock()) {
|
||||
pika_platform_thread_yield();
|
||||
}
|
||||
/* wait python thread get first lock */
|
||||
while (!_VM_is_first_lock() && g_PikaVMState.vm_cnt != 0) {
|
||||
pika_platform_thread_yield();
|
||||
}
|
||||
pika_GIL_ENTER();
|
||||
#if PIKA_EVENT_THREAD_ENABLE
|
||||
|
@ -2,4 +2,4 @@
|
||||
#define PIKA_VERSION_MINOR 13
|
||||
#define PIKA_VERSION_MICRO 3
|
||||
|
||||
#define PIKA_EDIT_TIME "2024/05/02 23:58:57"
|
||||
#define PIKA_EDIT_TIME "2024/05/03 00:02:22"
|
||||
|
Loading…
x
Reference in New Issue
Block a user