Allow only one task to be running at a time.