We only ask the main thread for state and is defunct. We can cache the state and use an atomic member for the is defunct.
Created attachment 448093 [details] Patch
Comment on attachment 448093 [details] Patch Patch looks okay, but in need of a rebase. Could you please update it?
Actually I forgot to update the depends on.
Comment on attachment 448093 [details] Patch Clearing flags
This doesn't make sense now that we don't use isolated tree.