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

opt: implement the lock-free queue for dispatching tasks faster #181

Merged
merged 7 commits into from
Feb 5, 2021

Conversation

panjf2000
Copy link
Owner


name: Pull request
about: Propose changes to the code
title: ''
labels: ''
assignees: ''

1. Are you opening this pull request for bug-fixs, optimizations or new feature?

2. Please describe how these code changes achieve your intention.

3. Please link to the relevant issues (if any).

4. Which documentation changes (if any) need to be made/updated because of this PR?

4. Checklist

  • I have squashed all insignificant commits.
  • I have commented my code for explaining package types, values, functions, and non-obvious lines.
  • I have written unit tests and verified that all tests passes (if needed).
  • I have documented feature info on the README (only when this PR is adding a new feature).
  • (optional) I am willing to help maintain this change if there are issues with it later.

@panjf2000 panjf2000 added enhancement New feature or request pending development Requested PR owner to improve code and waiting for the result pending merged This PR has been reviewed and approved labels Feb 5, 2021
@panjf2000 panjf2000 force-pushed the lock-free-queue branch 3 times, most recently from 14d06b1 to c91cadb Compare February 5, 2021 11:05
@codecov
Copy link

codecov bot commented Feb 5, 2021

Codecov Report

Merging #181 (1c74459) into master (028bab2) will decrease coverage by 0.28%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #181      +/-   ##
==========================================
- Coverage   84.09%   83.81%   -0.29%     
==========================================
  Files          18       18              
  Lines        1182     1180       -2     
==========================================
- Hits          994      989       -5     
- Misses        144      149       +5     
+ Partials       44       42       -2     
Flag Coverage Δ
unittests 83.81% <100.00%> (-0.29%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
eventloop_unix.go 66.44% <ø> (-2.59%) ⬇️
eventloop_windows.go 89.65% <ø> (-0.27%) ⬇️
reactor_bsd.go 100.00% <ø> (ø)
reactor_linux.go 86.36% <ø> (-1.64%) ⬇️
server_unix.go 91.60% <100.00%> (+0.36%) ⬆️
server_windows.go 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 028bab2...1c74459. Read the comment docs.

@panjf2000 panjf2000 merged commit 00bea60 into master Feb 5, 2021
@panjf2000 panjf2000 deleted the lock-free-queue branch February 5, 2021 15:42
0-haha pushed a commit to 0-haha/gnet that referenced this pull request Jan 25, 2023
…f2000#181)

* opt: implement the lock-free queue for dispatching tasks

* cleanup: add "race" flag in go test

* cleanup: remove tedious code in test

* cleanup: add log back

* fix: resolve a race test

* fix: resolve race test on Windows

* fix: resolve race test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request pending development Requested PR owner to improve code and waiting for the result pending merged This PR has been reviewed and approved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant