All Projects → rocketlaunchr → go-pool

rocketlaunchr / go-pool

Licence: MIT license
A better Generic Pool (sync.Pool)

Programming Languages

go
31211 projects - #10 most used programming language

Labels

Projects that are alternatives of or similar to go-pool

errgroup
errgroup with goroutine worker limits
Stars: ✭ 143 (+240.48%)
Mutual labels:  sync, pool
kylin-jdbc-pool
better performance for kylin query
Stars: ✭ 15 (-64.29%)
Mutual labels:  pool
CryptoSync
Cross-platform end-to-end encryption cloud sync client ☁️ 🔒
Stars: ✭ 38 (-9.52%)
Mutual labels:  sync
CSV
A simple CSV file parser and serializer
Stars: ✭ 31 (-26.19%)
Mutual labels:  sync
ezcontentstaging
eZPublish Legacy extension allowing content synchronization between different installations
Stars: ✭ 17 (-59.52%)
Mutual labels:  sync
scroll-sync-react
A scroll syncing library for react that is up to date
Stars: ✭ 49 (+16.67%)
Mutual labels:  sync
sync-pkg
Minimalist CLI to sync only basic properties from package.json to bower.json
Stars: ✭ 15 (-64.29%)
Mutual labels:  sync
workerpool
A workerpool that can get expanded & shrink dynamically.
Stars: ✭ 55 (+30.95%)
Mutual labels:  pool
CryptoProfitSwitcher
Extensible profit switcher for crypto coins and algorithms
Stars: ✭ 49 (+16.67%)
Mutual labels:  pool
trylock
TryLock for Go
Stars: ✭ 65 (+54.76%)
Mutual labels:  sync
netbox-sync
Sync objects from VMware or redfish sources to NetBox
Stars: ✭ 172 (+309.52%)
Mutual labels:  sync
ramos
Generic backend pool
Stars: ✭ 30 (-28.57%)
Mutual labels:  pool
L3-37
Yet another Tokio connection pooler. May cause robot uprising.
Stars: ✭ 53 (+26.19%)
Mutual labels:  pool
sicksync
Don’t accept the available as the preferable. Go the extra mile with extra speed.
Stars: ✭ 67 (+59.52%)
Mutual labels:  sync
lockpick
A CLI for syncing Dart dependency versions between pubspec.yaml and pubspec.lock files.
Stars: ✭ 34 (-19.05%)
Mutual labels:  sync
neth-proxy
Stratum <-> Stratum Proxy and optimizer for ethminer
Stars: ✭ 35 (-16.67%)
Mutual labels:  pool
bookmark
chrome插件。"Bookmark" 帮助用户处理Chrome书签中"其他书签",解决书签过多难以保存,查阅不变和管理不变的问题。有存储"临时"书签,分类保存书签,快捷键,自定义设置,快捷查看书签,高效管理书签等功能。
Stars: ✭ 34 (-19.05%)
Mutual labels:  sync
vuepouch
A tiny library to enable you work with PouchDB in a Vuejs app. It syncs with remote CouchDB too :-)
Stars: ✭ 59 (+40.48%)
Mutual labels:  sync
finance-project-ddd
Projeto financeiro usando domain driven design, tdd, arquitetura hexagonal e solid
Stars: ✭ 67 (+59.52%)
Mutual labels:  pool
offPIM
Decentralized, Offline-first, Personal Information Manager (PIM) using PouchDB/CouchDB. Includes task-, note-, and contact-management, as well as journaling.
Stars: ✭ 63 (+50%)
Mutual labels:  sync

  the project to show your appreciation. ↗️

go-pool

A Better sync.Pool

This package is a thin wrapper over the Pool provided by the sync package. The Pool is an essential package to obtain maximum performance by reducing the number of memory allocations.

Extra Features

  • Invalidate an item from the Pool (so it never gets used again)
  • Set a maximum number of items for the Pool
  • Returns the number of items in the pool (idle and in-use)

When should I use a pool?

If you frequently allocate many objects of the same type and you want to save some memory allocation and garbage allocation overhead — @jrv

How did I improve latency by 700% using sync.Pool

Example

import "github.com/rocketlaunchr/go-pool"

pool := pool.New(5) // maximum of 5 items in pool
pool.SetFactory(func() interface{} {
	return &X{}
})

item := pool.Borrow()
defer item.Return()

// Use item here or mark as invalid
x := item.Item.(*X) // Use item here
item.MarkAsInvalid()

Other useful packages

  • awesome-svelte - Resources for killing react
  • dataframe-go - Statistics and data manipulation
  • dbq - Zero boilerplate database operations for Go
  • electron-alert - SweetAlert2 for Electron Applications
  • google-search - Scrape google search results
  • igo - A Go transpiler with cool new syntax such as fordefer (defer for for-loops)
  • mysql-go - Properly cancel slow MySQL queries
  • react - Build front end applications using Go
  • remember-go - Cache slow database queries
  • testing-go - Testing framework for unit testing

Logo Credits

  1. Renee French (gopher)
  2. Samuel Jirénius (illustration)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].