Directories ¶
Path | Synopsis |
---|---|
building_blocks
|
|
channels
Package main illustrated goroutines that take the place of ownership of a channeland another that handles reading from it.
|
Package main illustrated goroutines that take the place of ownership of a channeland another that handles reading from it. |
goroutines/size
Package main aims to measure the amount of computer resources that was consumed to create goroutines
|
Package main aims to measure the amount of computer resources that was consumed to create goroutines |
sync/cond_broadcast
Package main illustrates creating a GUI application with a button.
|
Package main illustrates creating a GUI application with a button. |
sync/cond_signal
Package main illustrates a goroutine that is waiting for a signal and another goroutine that is sending the signals.
|
Package main illustrates a goroutine that is waiting for a signal and another goroutine that is sending the signals. |
sync/mutex
Package main illustrated two goroutines that are attempting to increment or decrement a common value it uses a Mutex to synchronize access to memory
|
Package main illustrated two goroutines that are attempting to increment or decrement a common value it uses a Mutex to synchronize access to memory |
sync/network_service_1
Package main simulates creating a connection without Pool to a service that takes time to respond.
|
Package main simulates creating a connection without Pool to a service that takes time to respond. |
sync/network_service_2
Package main simulates how performant creating a connection with Pool to a service that takes time to respond.
|
Package main simulates how performant creating a connection with Pool to a service that takes time to respond. |
sync/pool_1
Package main illustrates the use of sync.Pool, Pool's primary interface is its Get method.
|
Package main illustrates the use of sync.Pool, Pool's primary interface is its Get method. |
sync/rwmutex
Package main illustrates the use of RWMutex to demonstrate a producer that is less active than the numerous consumers created.
|
Package main illustrates the use of RWMutex to demonstrate a producer that is less active than the numerous consumers created. |
sync/waitgroup
Package main illustrates the usage of waitgroup
|
Package main illustrates the usage of waitgroup |
Package main illustrates an opinionated way on how to handle error propagation in a complex system
|
Package main illustrates an opinionated way on how to handle error propagation in a complex system |
Package main is the implementation of the logic that monitors the health of a goroutine, to achieve this, it needs a reference to a function that can start the goroutine.
|
Package main is the implementation of the logic that monitors the health of a goroutine, to achieve this, it needs a reference to a function that can start the goroutine. |
Package main illustrates a concurrent code, goroutine that exposes a heartbeat.
|
Package main illustrates a concurrent code, goroutine that exposes a heartbeat. |
patterns
|
|
bridge_channel
Package main is the implementation of a bridge-channel pattern
|
Package main is the implementation of a bridge-channel pattern |
cancellation/terminate_2
Package main illustrates cancellation of a goroutine blocked by on attempting to write value to a channel
|
Package main illustrates cancellation of a goroutine blocked by on attempting to write value to a channel |
confinement/ad_hoc
Package main has the implementation of a ad hoc confinement concurrency pattern
|
Package main has the implementation of a ad hoc confinement concurrency pattern |
confinement/lexical
Package main has the implementation of a lexical confinement concurrency pattern, I favour this pattern over the ad hoc pattern
|
Package main has the implementation of a lexical confinement concurrency pattern, I favour this pattern over the ad hoc pattern |
context/cancellation
Package main illustrate the use a context for cancellation instead of a done channel
|
Package main illustrate the use a context for cancellation instead of a done channel |
context/data_storage
Package main illustrates using context as a data storage or keep to store and retrive request-scoped data.
|
Package main illustrates using context as a data storage or keep to store and retrive request-scoped data. |
fan_in_out
Package main illustrated a fan-out, fan-in pattern using it to find prime numbers in a stream of data
|
Package main illustrated a fan-out, fan-in pattern using it to find prime numbers in a stream of data |
handle_error
Package main illustrates how to handle errors from goroutines
|
Package main illustrates how to handle errors from goroutines |
or_done
Package main is the implementation of the or-done-channel pattern
|
Package main is the implementation of the or-done-channel pattern |
pipeline
Package main illustrates a best practice pattern for creating pipelines
|
Package main illustrates a best practice pattern for creating pipelines |
Package main is an implementation of the token bucket algorithm to rate limit requests.
|
Package main is an implementation of the token bucket algorithm to rate limit requests. |
Package main illustrates how to replicate a simulated requests over a certain number of handlers
|
Package main illustrates how to replicate a simulated requests over a certain number of handlers |
Click to show internal directories.
Click to hide internal directories.