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

Remove one pair of lock() / unlock() during EventLoop run. #235

Merged
merged 1 commit into from
Mar 26, 2018

Conversation

normanmaurer
Copy link
Member

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.

@normanmaurer normanmaurer requested review from weissi and Lukasa March 26, 2018 13:54
@normanmaurer
Copy link
Member Author

less locking FTW 🎉

@normanmaurer normanmaurer added this to the 1.4.0 milestone Mar 26, 2018
@normanmaurer normanmaurer added the 🔨 semver/patch No public API change. label Mar 26, 2018
Copy link
Member

@weissi weissi left a 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

Lukasa
Lukasa previously requested changes Mar 26, 2018
Copy link
Contributor

@Lukasa Lukasa left a 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.

}

let cnt = tasksCopy.count
Copy link
Contributor

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?

Copy link
Member Author

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.

Copy link
Member Author

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.
@normanmaurer
Copy link
Member Author

I will merge once the CI completes :)

@normanmaurer normanmaurer merged commit cce02c9 into apple:master Mar 26, 2018
@normanmaurer normanmaurer deleted the remove_lock branch March 26, 2018 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 semver/patch No public API change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants