Slightly adapted. I wasn't sure how much guarantee we have around the change propagation when calling terminate() right after the delete. Flipped it around a bit, having the worker outlive the manger instead.