Optimize fiber_io_check() for no fiber mode.

This commit is contained in:
zhengshuxin 2024-10-28 11:08:46 +08:00
parent fc47a6bebc
commit 112c6cf452
2 changed files with 2 additions and 6 deletions

View File

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

View File

@ -145,10 +145,6 @@ static pthread_once_t __once_control = PTHREAD_ONCE_INIT;
void fiber_io_check(void)
{
if (!var_hook_sys_api) {
return;
}
if (__thread_fiber == NULL) {
if (pthread_once(&__once_control, thread_once) != 0) {
printf("%s(%d), %s: pthread_once error %s\r\n",
@ -157,7 +153,7 @@ void fiber_io_check(void)
}
thread_init();
} else if (__thread_fiber->ev_fiber == NULL) {
} else if (var_hook_sys_api && __thread_fiber->ev_fiber == NULL) {
__thread_fiber->ev_fiber = acl_fiber_create(fiber_io_loop,
__thread_fiber->event, STACK_SIZE);
__thread_fiber->io_stop = 0;