Use #update of Atomic to keep add_global_context thread safe