commit | 3ea17833a427b0c2c1364cae7d515a5c7337001e | [log] [tgz] |
---|---|---|
author | Mike Burrows <m3b@google.com> | Thu May 12 15:51:11 2016 -0700 |
committer | Mike Burrows <m3b@google.com> | Thu May 12 15:51:11 2016 -0700 |
tree | a37e4569b4111ea5b0c114e07083567bf9525988 | |
parent | 5ebb3a3aa7afc57530e13003bcd64a8ec38ea6a4 [diff] |
v.io/x/lib/nsync: An implementation of mutex and condition variables The nsync package provides a mutex Mu and a Mesa-style condition variable CV. The nsync primitives differ from those in sync in that nsync provides timed wait on CV and try-lock on Mu, CV's wait primitives take the mutex as an explicit argument to remind the reader that they have a side effect on the mutex, the zero value CV can be used without further initialization, and Mu forbids a lock acquired by one thread to be released by another. As well as Mu and CV being usable with one another, an nsync,Mu can be used with a sync.Cond, and an nsync.CV can be used with a sync.Mutex. Change-Id: Id6a14ebcf007bd4cb33dcc7b138d35f61db9546a
This repository contains general purpose libraries used by the Vanadium project.