Skip to content
Discussion options

You must be logged in to vote

For now, this repo doesn't try to optimize executions of CPU-bound tasks.

The biggest reason is that, in golang, goroutines are arranged over GPM models, which means task scheduling is not transparent to upper-layer developers. Tasks may be executed among multiple physical threads, and we cannot control their scheduling and execution, making optimization much harder.

So for now, the framework treats both kinds of tasks in the same way. The copool indeed tries to reduce goroutine overhead in a general way, but does not optimize them separately.

A simple optimization would be setting executor's concurrency and GOMAXPROCS to CPU CORES, making task cache friendly.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@noneback
Comment options

Answer selected by noneback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants