Currently, making concurrent updates of the Recode state is not safe. We need to add a locking mechanism.