the evil scheduler would be useful for catching deadlock bugs early

I don't doubt someone has built something like that for testing, though perhaps not as a library. I'm reminded of a networking service that does the same at a higher level, given its easy to remember name : https://github.com/tylertreat/comcast