add thread locking for schedulers and requesters (#24)