Simple thread limmiting

Created a queue and fill it with "tokens". A thread will then pop a
token to run an update, and give it back once finished.