 function, then keep waiting until success (0) or timeout (0).  which makes the master-slave syncing option independent of the slave threads. If the slave thread is not running the function, then keep waiting until success (0) or timeout (0). 