acl-dev / acl

C/C++ server and network library, including coroutine,redis client,http/https/websocket,mqtt, mysql/postgresql/sqlite client with C/C++ for Linux, Android, iOS, MacOS, Windows, etc..
https://acl-dev.cn
GNU Lesser General Public License v3.0
2.83k stars 937 forks source link

acl_fiber_signum issue #334

Closed pengwang7 closed 3 months ago

pengwang7 commented 3 months ago
/**
 * Get the signal number got from other fiber
 * @param fiber {ACL_FIBER*} the specified fiber, if NULL the current running
 * @retur {int} the signal number got
 */
int acl_fiber_signum(ACL_FIBER *fiber)
{
    if (fiber) {
        fiber = acl_fiber_running();
    }
    return fiber ? fiber->signum : 0;
}

根据注释,应该是 fiber 为 NULL的情况下,才获取当前正在运行的fiber

zhengshuxin commented 3 months ago

是的,问题已修复,谢谢指出此问题。

---zsx