fun onSync(callback: () -> Unit): Unit
Set the callback for sync event
Note: the callback might be called on another thread
callback - The function to be called on sync
callback