diff options
author | lukechampine <luke.champine@gmail.com> | 2016-03-31 02:08:30 -0400 |
---|---|---|
committer | lukechampine <luke.champine@gmail.com> | 2016-03-31 02:08:30 -0400 |
commit | c280e21fb34546e60ace8207f3dc2d4a785fec92 (patch) | |
tree | d837eea075c1be0bfeaea5cc6f0ee7d7301175fa | |
parent | rearrange + add comments (diff) | |
download | stm-c280e21fb34546e60ace8207f3dc2d4a785fec92.tar.gz stm-c280e21fb34546e60ace8207f3dc2d4a785fec92.tar.xz |
document weak equality
-rw-r--r-- | stm.go | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -69,6 +69,11 @@ behavior. One common way to get around this is to build up a list of impure operations inside the transaction, and then perform them after the transaction completes. +Another caveat: stm uses simple pointer equality to determine whether Vars +have changed during a transaction. For types containing mutable pointers, this +may be insufficient; immutable values should be used instead. Support for +proper versioning is planned. + 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 |