Bug 1614971 Comment 4 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

Alex gives some suggestions:

In addition to what you have, you could use the `if stm_guard.destroy_pending.load(Ordering::SeqCst)` inside the main body of `reinit_async()` in a way that we don't `async_dispatch` another reinit closure if this flag is true. In this case, you would also need synchronization between `destroy()` and `reinit_async()`.
Alex gives some suggestions:

In addition to what you have, you could use the `if stm_guard.destroy_pending.load(Ordering::SeqCst)` inside the main body of `reinit_async()` in a way that we don't `async_dispatch` another reinit closure if this flag is true. In this case, you would also need synchronization between `destroy()` and `reinit_async()`.

If the solution is the above I guess the c-api is not protected by this problem, probably we haven't tried the same test.
 Got some suggestions from Alex:

--------------------------------------------
In addition to what you have, you could use the `if stm_guard.destroy_pending.load(Ordering::SeqCst)` inside the main body of `reinit_async()` in a way that we don't `async_dispatch` another reinit closure if this flag is true. In this case, you would also need synchronization between `destroy()` and `reinit_async()`.

If the solution is the above I guess the c-api is not protected by this problem, probably we haven't tried the same test.

Back to Bug 1614971 Comment 4