Package boc is a Go implementation of paper "When Concurrency Matters: Behaviour-Oriented Concurrency" in OOPSLA2023. It's a coarse-grained concurrency pattern which coordinates parallelism and concurrency.
Use go get -u github.com/Lslightly/boc
to download and upgrade to the latest module.
See Documentation for more details.
When tranfering money, acquire multiple concurrent owners(cown), here src
and dst
at the same time, transfer the money and release them after the transfer.
After acquiring src
, acquire log
to write the log.
- Cown Type 1: Nodes in the graph indicate the range of array to sort.
- Cown Type 2: Directed edges indicate the communication channel between nodes.
Once the dependencies are satisfied, the node can start to sort the array.
- Coarse-grained control of resources. All resources have to be released after the
when
statement. - The dependencies have to be hard coded within one module.
- Deadlock can still occur.
this is not my opinion but the result of discussion with someone else.
This package is rewritten from boc.rs. The benchmark is provided by kaist-cp/cs431 and rewritten in Go.
Thanks for authors of kaist-cp/cs431 and paper.