Optimize fiber event process.

This commit is contained in:
zhengshuxin 2024-10-26 13:53:44 +08:00
parent c8da96ebc2
commit 721b5f383b
2 changed files with 3 additions and 5 deletions

View File

@ -25,7 +25,7 @@
#include "init.h"
static char *version = "3.6.1-6 20241025-17:42";
static char *version = "3.6.1-6 20241026-13:34";
const char *acl_version(void)
{

View File

@ -586,9 +586,7 @@ int fiber_wait_read(FILE_EVENT *fe)
// If the IO reading timeout set in setsockopt.
// Clear FIBER_F_TIMER flag been set in wakeup_timers.
curr->flag &= ~FIBER_F_TIMER;
// Delete the IO read event directly, don't buffer the delete
// status.
event_del_read(__thread_fiber->event, fe, 1);
event_del_read(__thread_fiber->event, fe, 0);
acl_fiber_set_errno(curr, FIBER_EAGAIN);
acl_fiber_set_error(FIBER_EAGAIN);
@ -683,7 +681,7 @@ int fiber_wait_write(FILE_EVENT *fe)
#ifndef USE_POLL_WAIT
else if (curr->flag & FIBER_F_TIMER) {
curr->flag &= ~FIBER_F_TIMER;
event_del_write(__thread_fiber->event, fe, 1);
event_del_write(__thread_fiber->event, fe, 0);
acl_fiber_set_errno(curr, FIBER_EAGAIN);
acl_fiber_set_error(FIBER_EAGAIN);