Skip to content
  • Simon Marlow's avatar
    Close the races between throwTo and thread completion · ea1ad23f
    Simon Marlow authored
    Any threads we missed were being caught by the GC (possibly the idle
    GC if the system was otherwise inactive), but that's not ideal.  The
    fix (from Bertram Felgenhauer) is to use lockTSO to synchronise,
    imposing an unconditional lockTSO on thread exit.  I couldn't measure
    any performance overhead from doing this, so it seems reasonable.
    ea1ad23f