Skip to content

Commit

Permalink
Optimize fiber event process.
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengshuxin committed Oct 26, 2024
1 parent c8da96e commit 721b5f3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib_acl/src/init/acl_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
6 changes: 2 additions & 4 deletions lib_fiber/c/src/fiber_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 721b5f3

Please sign in to comment.