A thread can ask for a quit token to perform the operations associated with closing the transfer.
The token is interpreted as a permission to perform these operations. The reason for such policy
lies mainly in the nature of multithreaded transfer, where there are many transfer threads sharing
the same context, but the closing should be done only once.
a non-null token is a permission for closing, null means no permission.