Skip to content
forked from reugn/async

Synchronization and asynchronous computation package for Go

License

Notifications You must be signed in to change notification settings

rfyiamcool/async

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Async is a synchronization and asynchronous computation package for Go.

Overview

  • 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.
  • Task - A data type for controlling possibly lazy and asynchronous computations.
  • WaitGroupContext - A WaitGroup with the context.Context support for graceful unblocking.
  • Reentrant Lock - Mutex that allows goroutines to enter into the lock on a resource more than once.
  • Optimistic Lock - Mutex that allows optimistic reading. Could be retried or switched to RLock in case of failure. Significantly improves performance in case of frequent reads and short writes. See benchmarks.

Examples

Can be found in the examples directory/tests.

License

Licensed under the MIT License.

About

Synchronization and asynchronous computation package for Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%