Actual sync handling with mutex locks