internal void Cancel(int connection)
{
var currentState = PortStates[connection];
if (IsDebug) Console.WriteLine($"{Name} Cancel({connection}) [{currentState}]");
PortStates[connection] = currentState | InClosed;
if ((currentState & OutClosed) == 0)
{
ConnectionSlots[connection] = Empty.Instance;
if ((currentState & (Pulling | Pushing | InClosed)) == 0)
Enqueue(connection);
}
if ((currentState & InClosed) == 0)
CompleteConnection(Assembly.InletOwners[connection]);
}