synchronizing like this always makes me very wary. Nothing else in this class synchronizes, so presumably you're relying on other synchronization that happens inside `BasicTask` or `DynamicSequentialTask` or some such. This at least needs an explanation of what the synchronization achieves and a reference to the other code that will also be synchronizing on this object. That other class should javadoc its threading model if it expects other code to synchronize on it.

Generally I like to avoid this patter if at all possible: it's often brittle, hard to understand code that gives serious risk of deadlock. I often synchronize on internal fields instead, but that would have prevented you doing whatever it is you needed to do here!