Skip to content

Instantly share code, notes, and snippets.

@gigamonkey
gigamonkey / twophase.scala
Last active December 22, 2015 13:29 — forked from johnynek/twophase.scala
What I came up with while mucking around trying to understand your code.
// Run this with scala <filename>
import java.util.concurrent.atomic.AtomicLong
val txIds = new AtomicLong(0)
// Dummied up transaction id provider
def nextTxId = txIds.incrementAndGet
/**