Skip to content

Commit 6485676

Browse files
author
zhengshuxin
committed
Fixed one bug in acl_fiber_sem_post() API.
1 parent f6f06f6 commit 6485676

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

c/src/sync/fiber_sem.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,12 @@ int acl_fiber_sem_post(ACL_FIBER_SEM *sem)
187187
sem->num++;
188188

189189
if ((ready = FIRST_FIBER(&sem->waiting)) == NULL) {
190+
#if 0
191+
// Don't yield here to avoid never wakeup. --zsx, 2025.1.9
190192
if (sem->num >= sem->buf) {
191193
acl_fiber_yield();
192194
}
195+
#endif
193196
return sem->num;
194197
}
195198

0 commit comments

Comments
 (0)