Skip to content

Conversation

@charleswhchan
Copy link
Contributor

According to the README:

Use the second parameter of server.NewWorker to limit the number of concurrently running
worker.Process() calls (per worker). Example: 1 will serialize task execution while 0 makes
the number of concurrently executed tasks unlimited (default).

This change will set the concurrency to 2 * num CPUs when concurrency = 0. While it isn't "unlimited", it is neverthe a practical choice for most workloads (mixed CPU, I/O) and better than 1. This change should make the behavior more consistent with the doc.

Should also fix #535

Charles Chan and others added 2 commits May 23, 2020 19:18
According to the README:
> Use the second parameter of `server.NewWorker` to limit the number of concurrently running
> worker.Process() calls (per worker). Example: 1 will serialize task execution while 0 makes
> the number of concurrently executed tasks unlimited (default).

This change will set the concurrency to 2 * num CPUs when concurrency = 0. While it isn't "unlimited", it is neverthe a practical choice for most workloads (mixed CPU, I/O) and better than 1. This change should make the behavior more consistent with the doc.

Should also fix #535
@codecov
Copy link

codecov bot commented May 25, 2020

Codecov Report

Merging #553 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #553   +/-   ##
=======================================
  Coverage   39.19%   39.19%           
=======================================
  Files          32       32           
  Lines        3345     3345           
=======================================
  Hits         1311     1311           
  Misses       1892     1892           
  Partials      142      142           

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 353ff2f...69b2ad4. Read the comment docs.

@RichardKnop RichardKnop merged commit 6d3fd3e into RichardKnop:master May 25, 2020
@charleswhchan charleswhchan deleted the issue-529-redis-default-concurrency branch May 25, 2020 21:05
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.

Worker Blocks When Concurrency Is Set To 0

2 participants