Add the synchronization helpers

I'll follow up with some PR for some barclamps, to show how this is used.