draft/resume-0.2 implementation, message history support

This commit is contained in:
Shivaram Lingamneni 2018-11-26 05:23:27 -05:00
parent 70364f5f67
commit a0bf548fc5
28 changed files with 1294 additions and 317 deletions

View file

@ -80,3 +80,12 @@ func BitsetUnion(set []uint64, other []uint64) {
}
}
}
// BitsetCopy copies the contents of `other` over `set`.
// Similar caveats about race conditions as with `BitsetUnion` apply.
func BitsetCopy(set []uint64, other []uint64) {
for i := 0; i < len(set); i++ {
data := atomic.LoadUint64(&other[i])
atomic.StoreUint64(&set[i], data)
}
}