Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cpg1111/threadpool-go
OS Thread Pool For Golang
https://github.com/cpg1111/threadpool-go
go golang thread-pool threading threads
Last synced: 3 days ago
JSON representation
OS Thread Pool For Golang
- Host: GitHub
- URL: https://github.com/cpg1111/threadpool-go
- Owner: cpg1111
- License: mit
- Created: 2017-06-24T03:42:04.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-10-12T17:19:11.000Z (about 7 years ago)
- Last Synced: 2024-06-20T12:49:51.242Z (5 months ago)
- Topics: go, golang, thread-pool, threading, threads
- Language: Go
- Size: 10.7 KB
- Stars: 8
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# threadpool-go
A Threadpool of OS threads in Golang
## Why
While this library does defeat the purpose of one of Go's key feautres (goroutines), there are time in Go programs that cannot afford the amount of context switches that can come with a goroutine. And while goroutines will run on an OS thread until completion with some exceptions (those exceptions often being net.Conn's select/epoll IO or blocking on channel operations), there are times where bypassing the Go runtime's scheduler can be beneficial.
This library leverages that by providing an already instantiated pool of OS threads with more exposed control of what gets executed onto them.