#communication-channel #parallel #key #statically #synchronization #accesses #performance

two_phase_channel

A safe synchronisation-free parallel communication channel by statically forbidding conflicting accesses

4 releases

0.2.2 Mar 2, 2024
0.2.1 Feb 29, 2024
0.2.0 Feb 29, 2024
0.1.0 Feb 29, 2024

#568 in Concurrency

Download history 282/week @ 2024-02-26 40/week @ 2024-03-04 4/week @ 2024-03-11 67/week @ 2024-04-01

73 downloads per month

BSD-2-Clause

37KB
614 lines

Two-Phase Channel

Various safe synchronisation-free parallel communication channels. The channels support the transmission of one data item, i.e. they have no queue. The synchronisation is externalised by requiring zero-sized key types to access the channels. This is useful if a computation can be split into separate compute and communicate steps. Then, the two-phase channel allows the steps to work without any internal synchronisation, the threads only need to be synchronised between the steps.

While this libary was made with performance in mind, it is unclear if this pattern actually improves performance for any given computational task. Use at your own discretion.

No runtime deps