A little library to simulate a thread