Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add namespace for currentThreadEventLoop and when there is no worker thread loop, acceptor_loop should also be returned #568

Merged
merged 2 commits into from
Jun 12, 2024

Conversation

fuzhufang
Copy link
Contributor

No description provided.

@fuzhufang fuzhufang closed this Jun 11, 2024
@fuzhufang fuzhufang changed the title add namespace for currentThreadEventLoop and add namespace for currentThreadEventLoop and when there is no worker thread loop, acceptor_loop should also be returned Jun 11, 2024
@fuzhufang
Copy link
Contributor Author

In the static method onAccept, When the worker thread loop is not obtained, acceptor_loop is also used. Therefore, in method: EventLoopPtr loop (int idx=-1), when there is no worker thread loop, acceptor_loop should also be returned Otherwise, in a scenario where there is only one acceptor_loop no worker loop, calling the loop method will return null, resulting in a segment error when using it

#Define currentThreadEventLoop tlsEventLoop() to define the namespace ::hv:: , otherwise using currentThreadEventLoop in a non hv namespace will result in an error

@fuzhufang fuzhufang reopened this Jun 11, 2024
@ithewei ithewei merged commit c4e3b53 into ithewei:master Jun 12, 2024
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants