GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - reugn/async: Synchronization and asynchronous computation package for Go

BranchesTags
Open more actions menu

Latest commit

 

History

92 Commits
92 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
benchmarks
benchmarks
 
 
docs/images
docs/images
 
 
examples
examples
 
 
internal
internal
 
 
.codecov.yml
.codecov.yml
 
 
.gitignore
.gitignore
 
 
.golangci.yml
.golangci.yml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
cyclic_barrier.go
cyclic_barrier.go
 
 
cyclic_barrier_test.go
cyclic_barrier_test.go
 
 
executor.go
executor.go
 
 
executor_test.go
executor_test.go
 
 
future.go
future.go
 
 
future_test.go
future_test.go
 
 
future_utils.go
future_utils.go
 
 
go.mod
go.mod
 
 
goroutine.go
goroutine.go
 
 
goroutine_test.go
goroutine_test.go
 
 
map.go
map.go
 
 
map_concurrent.go
map_concurrent.go
 
 
map_sharded.go
map_sharded.go
 
 
map_test.go
map_test.go
 
 
once.go
once.go
 
 
once_test.go
once_test.go
 
 
priority_lock.go
priority_lock.go
 
 
priority_lock_test.go
priority_lock_test.go
 
 
promise.go
promise.go
 
 
reentrant_lock.go
reentrant_lock.go
 
 
reentrant_lock_test.go
reentrant_lock_test.go
 
 
task.go
task.go
 
 
task_test.go
task_test.go
 
 
value.go
value.go
 
 
value_test.go
value_test.go
 
 
wait_group_context.go
wait_group_context.go
 
 
wait_group_context_test.go
wait_group_context_test.go
 
 

Repository files navigation


Async provides a comprehensive set of synchronization primitives and asynchronous computation utilities for Go, complementing the standard library with additional concurrency patterns and data structures.

Features

  • ConcurrentMap - Implements the generic async.Map interface in a thread-safe manner by delegating load/store operations to the underlying sync.Map.
  • ShardedMap - Implements the generic async.Map interface in a thread-safe manner, delegating load/store operations to one of the underlying async.SynchronizedMaps (shards), using a key hash to calculate the shard number.
  • Future - A placeholder object for a value that may not yet exist.
  • Promise - While futures are defined as a type of read-only placeholder object created for a result which doesn’t yet exist, a promise can be thought of as a writable, single-assignment container, which completes a future.
  • Executor - A worker pool for executing asynchronous tasks, where each submission returns a Future instance representing the result of the task.
  • Task - A data type for controlling possibly lazy and asynchronous computations.
  • Once - An object similar to sync.Once having the Do method taking f func() (T, error) and returning (T, error).
  • Value - An object similar to atomic.Value, but without the consistent type constraint.
  • CyclicBarrier - A reusable synchronization primitive that allows a group of goroutines to wait for each other to reach a common barrier point.
  • WaitGroupContext - A WaitGroup with the context.Context support for graceful unblocking.
  • ReentrantLock - A mutex that allows goroutines to enter into the lock on a resource more than once.
  • PriorityLock - A non-reentrant mutex that allows for the specification of lock acquisition priority.

Examples

Runnable examples are available in the examples directory. See the test files for additional usage examples.

License

Licensed under the MIT License.

About

Synchronization and asynchronous computation package for Go

pkg.go.dev/github.com/reugn/async

Topics

asyncasynchronousasynchronous-apibarrierconcurrencyconcurrent-mapfuturegenericsgolockmutexpromisesynchronizationzero-dependency

Resources

Readme
MIT license
Activity

Stars

314 stars

Watchers

3 watching

Forks

15 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.