implemented a more aggressive thread cancelation approach, I believe, that the old approach may have led to race conditions