Fedora Packages

golang-github-anacrolix-stm-devel Subpackage of golang-github-anacrolix-stm

Software Transactional Memory in Go

Package stm provides Software Transactional Memory operations for Go. This is an alternative to the standard way of writing concurrent code (channels and mutexes). STM makes it easy to perform arbitrarily complex operations in an atomic fashion. One of its primary advantages over traditional locking is that STM transactions are composable, whereas locking functions are not -- the composition will either deadlock or release the lock between functions (making it non-atomic). The stm API tries to mimic that of Haskell's Control.Concurrent.STM, but this is not entirely possible due to Go's type system; we are forced to use interface{} and type assertions. Furthermore, Haskell can enforce at compile time that STM variables are not modified outside the STM monad. This is not possible in Go, so be especially careful when using pointers in your STM code. Another significant departure is that stm.Atomically does not return a value. This shortens transaction code a bit, but I'm not 100% it's the right decision. (The alternative would be for every transaction function to return an interface{}.) This package contains the source code needed for building packages that reference the following Go import paths: – github.com/anacrolix/stm

Releases Overview

Release Stable Testing
Fedora 38 0.3.0-6.fc38 -
File a new bug report »
Package Info

You can contact the maintainers of this package via email at golang-github-anacrolix-stm dash maintainers at fedoraproject dot org.



Sources on Pagure