Previously pkg/singleflight
Imported from github.com/camlistore/go4/ at rev
039bcc4ca7e407e5611cbdf15a1f208be0bceda0
Also reimport vendor/go4.org/syncutil because some of it got split into
github.com/camlistore/go4/syncutil/syncdebug
Change-Id: Iaf48de71928d17e0410442ea6f5bef7262ba60d2
Simplifies the code a bit, even though locking is a bit more coarse
now. We can make it faster later if it matters, especially now that
there's a test (which reliably failed before this fix).
Fixes camlistore.org/issue/264
Change-Id: Ifac79728f6a105ba76a60997c55c5d7d818f6f71
We could actually do better than this and use the fd already open
from the still-appending file, or just keep one fd open per pack
file.
But this is a start.
Change-Id: I164a9bdf44987c3f057872cc7fdee1735f9e89a9
misc.CountingReader moves into readerutil.
pkg/atomics is folded into pkg/types.
pkg/test/testdep is folded into pkg/test, with better name/docs.
Old cruft from pkg/webserver is deleted.
Change-Id: I3f72d8b29804254ef944995fb085837c878f79f5