Synchronize access to cfg and clients