Implement synchronization via mutexes for thread-safe updates.
Update README with instructions and information about thread-safety.