Ananfa
Ananfa
原实现: ``` if (update_occupy_co && update_pending_co && update_occupy_co != update_pending_co) { ... } ``` 当使用共享栈协程,且当有协程回收时,update_occupy_co有可能为NULL,此时进不了条件中执行协程栈恢复,建议改为: ``` if (update_pending_co && update_occupy_co != update_pending_co) { ... } ```
原实现: ``` void co_free( stCoRoutine_t *co ) { if (!co->cIsShareStack) { free(co->stack_mem->stack_buffer); free(co->stack_mem); } free( co ); } ``` 建议修改为: ``` void co_free( stCoRoutine_t *co ) { if (!co->cIsShareStack) {...