Now using pthread_mutex_lock() and pthread_mutex_unlock() for synchronization.
Updated README file.