How To Install golang-github-anacrolix-stm-devel on Fedora 36

In this tutorial we learn how to install golang-github-anacrolix-stm-devel in Fedora 36. golang-github-anacrolix-stm-devel is Software Transactional Memory in Go

Introduction

In this tutorial we learn how to install golang-github-anacrolix-stm-devel on Fedora 36.

What is golang-github-anacrolix-stm-devel

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

We can use yum or dnf to install golang-github-anacrolix-stm-devel on Fedora 36. In this tutorial we discuss both methods but you only need to choose one of method to install golang-github-anacrolix-stm-devel.

Install golang-github-anacrolix-stm-devel on Fedora 36 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install golang-github-anacrolix-stm-devel using dnf by running the following command:

sudo dnf -y install golang-github-anacrolix-stm-devel

Install golang-github-anacrolix-stm-devel on Fedora 36 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install golang-github-anacrolix-stm-devel using yum by running the following command:

sudo yum -y install golang-github-anacrolix-stm-devel

How To Uninstall golang-github-anacrolix-stm-devel on Fedora 36

To uninstall only the golang-github-anacrolix-stm-devel package we can use the following command:

sudo dnf remove golang-github-anacrolix-stm-devel

golang-github-anacrolix-stm-devel Package Contents on Fedora 36

/usr/share/doc/golang-github-anacrolix-stm-devel
/usr/share/doc/golang-github-anacrolix-stm-devel/README.md
/usr/share/gocode/src/github.com
/usr/share/gocode/src/github.com/anacrolix
/usr/share/gocode/src/github.com/anacrolix/stm
/usr/share/gocode/src/github.com/anacrolix/stm/.goipath
/usr/share/gocode/src/github.com/anacrolix/stm/README.md
/usr/share/gocode/src/github.com/anacrolix/stm/bench_test.go
/usr/share/gocode/src/github.com/anacrolix/stm/doc.go
/usr/share/gocode/src/github.com/anacrolix/stm/doc_test.go
/usr/share/gocode/src/github.com/anacrolix/stm/external_test.go
/usr/share/gocode/src/github.com/anacrolix/stm/funcs.go
/usr/share/gocode/src/github.com/anacrolix/stm/go.mod
/usr/share/gocode/src/github.com/anacrolix/stm/metrics.go
/usr/share/gocode/src/github.com/anacrolix/stm/rate
/usr/share/gocode/src/github.com/anacrolix/stm/rate/rate_test.go
/usr/share/gocode/src/github.com/anacrolix/stm/rate/ratelimit.go
/usr/share/gocode/src/github.com/anacrolix/stm/retry.go
/usr/share/gocode/src/github.com/anacrolix/stm/stm_test.go
/usr/share/gocode/src/github.com/anacrolix/stm/stmutil
/usr/share/gocode/src/github.com/anacrolix/stm/stmutil/containers.go
/usr/share/gocode/src/github.com/anacrolix/stm/stmutil/context.go
/usr/share/gocode/src/github.com/anacrolix/stm/stmutil/context_test.go
/usr/share/gocode/src/github.com/anacrolix/stm/tx.go
/usr/share/gocode/src/github.com/anacrolix/stm/var-value.go
/usr/share/gocode/src/github.com/anacrolix/stm/var.go
/usr/share/licenses/golang-github-anacrolix-stm-devel
/usr/share/licenses/golang-github-anacrolix-stm-devel/LICENSE

References

Summary

In this tutorial we learn how to install golang-github-anacrolix-stm-devel on Fedora 36 using yum and [dnf]((/fedora/36/dnf/).