I believe a lock would be the best, we already have enough threads like this.