Go Channels: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 17: Line 17:
==Pipelines==
==Pipelines==
==Transferring the Ownership of Data==
==Transferring the Ownership of Data==
[[Go_Concurrency#Transferring_the_Ownership_of_Data|test]]


=Timeout=
=Timeout=
=Cancellation=
=Cancellation=

Revision as of 00:00, 16 January 2024

External

Internal

TODO

Deplete Go_Channels into this.

Overview

The Go chans provide a composable, concurrent-safer way to communicate between concurrent processes.

Because channels are composable with other channels, this makes writing large systems simpler, because you can coordinate the input from multiple subsystems by easily composing the output together. You can combine input channels with timeouts, cancellations, or message to other subsystems.

The select statement is the complement to Go's channels. It is what enables all the difficult parts of composing channels. select statement allows you to wait for events, select a message from competing channels in a uniform random way, continue on if there are no messages waiting, and more.

Also see:

Go Concurrency Programming Models

Channel Patterns

Pipelines

Transferring the Ownership of Data

test

Timeout

Cancellation