ThreadActionData emlpoys a ThreadLocal to maintain the association between threads and actions. This means that the association can only be removed by the associated thread. The finalize method on AtomicAction attempts, amongst other things, to ensure this association is broken by calling ThreadActionData.purgeAction(). Unfortunately it passes the current thread (the Finalizer thread) which means that the association is still retained. This also fails to remove any child thread from the basic action's child thread list for the same reason. Because it has no way of establishing the prior association this finalize method is an expensive waste of time. It would be best deleted.
Also, another detail of this cleanup is wrong. AtomicAction.removeThread(t) currently calls ThreadActionData.purgeAction(this). It should call ThreadActionData.purgeAction(this, t). This change would allow a cleanup thread which knows about the association to remove the correct child thread from the basic action's child thread list. However, it will oto get round the problem that ThreadActionData is using a ThreadLocal. Again, since there is no way of knowing the prior association this method is probably redundant.