Regarding flags, which are indeed mutable, here's my reasoning why I think they will be visible in the UI thread.

* `ask` uses an instance of `Response` to communicate the result, once the PC thread has finished work
* the calling thread synchronizes on the response when it waits for the response (`Response.get`)
* the PC thread synchronizes on the response when setting the result (`Response.set`)
* the two create a *happens-before* relationship between the `get` and `set` calls, meaning that all writes on the PC thread are now visible in the calling thread

The above should be enough to prove that after any `ask` call, the calling thread sees all state that was mutated by the PC thread. If I'm correct with the above,

then

* `mkCompletionProposal` is done inside an `ask`, calling thread is the same thread that will insert the completion in the editor (the UI thread) ==> the flags should be visible.