Run this from the manager (the R process from which you create the
cluster) if you need a lock. The lock is created, lockable/unlockable
by all threads. If boost is TRUE, The variable will be of class
boost.mutex; see the library synchronicity for details.