There's a very clear race condition here. Two plugins in the same generator process calling this at the same time, both getting the same settings, and then both modifying it differently (with one getting written over).

We _could_ write code to prevent this race within a single generator process. However, if setting metadata is not atomic (or at least scoped by key), we can't avoid this race across generator processes.

@timothynoel Could we instead create an API that lets us set a single key/value in the metadata (leaving the rest intact)? Then, we'd also need an API for deleting a key/value pair.