cloudflare / mitmengine

A MITM (monster-in-the-middle) detection tool. Used to build MALCOLM:
https://malcolm.cloudflare.com
BSD 3-Clause "New" or "Revised" License
799 stars 68 forks source link

Ensure intsets work with when concurrent calls to Processor.Check() are made #8

Closed gabbifish closed 5 years ago

gabbifish commented 5 years ago

intsets.Sparse are not thread-safe, so I added mutexes to intset.Sparse operations to ensure we don't run into race conditions. I also did some general code cleanup.