Extra concurrency and synchronisation primitives. Needed by an upcoming update of databases/hs-redis. OK kili@