synchronizes adding tasks to removing them