-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Two questions about performance #133
Comments
Thanks for opening a new issue. The team has been notified and will review it as soon as possible. |
Where do you call
goroutine pool |
@panjf2000 Thanks for your response.
I need to call LockOSThread at the start of IO loop goroutine (the server startup) and call UnLockOSThread at the server shutdown. |
I'm afraid that it won't work as you expected, As currently structured, locking the I/O loop to a thread can't be done at the user level, it can only be done by modifying the source code and provide a functional option for users to determine whether to lock each I/O loop to a specified thread. |
I'll have this feature up and running by the end of the week, stay tuned! |
1- I need to use a nonblocking C library in io loops. The library uses thread local storage so I have to use LockOSThread in each io loop. Is it safe and does it affect gent performance (Excluding cgo overhead) ?
2- Gnet's thread pool system uses channels to pass blocking tasks to worker goroutines. I guess using channels , mutexes and anything else that cause go scheduler to switch goroutines may affect performance of io loops. Am I correct ?
The text was updated successfully, but these errors were encountered: