Added thread safety to random link scheduler.