-
Notifications
You must be signed in to change notification settings - Fork 656
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
Remove one pair of lock() / unlock() during EventLoop run. #235
Conversation
less locking FTW 🎉 |
de05774
to
4f6bf76
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 that looks good to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small note, otherwise this looks fine.
Sources/NIO/EventLoop.swift
Outdated
} | ||
|
||
let cnt = tasksCopy.count |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did this move into the lock?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Lukasa because I am stupid... let me fix this its not needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
Motivation: We can remove one lock() / unlock() pair by saving the next ready task during loop execution. Modifications: Remvoe one lock() / unlock() pair. Result: Less locking during EventLoop run executions.
4f6bf76
to
0a8ba30
Compare
I will merge once the CI completes :) |
Motivation:
We can remove one lock() / unlock() pair by saving the next ready task during loop execution.
Modifications:
Remvoe one lock() / unlock() pair.
Result:
Less locking during EventLoop run executions.