class Ractor::ClosedError
Raised when an attempt is made to send a message to a closed port, or to retrieve a message from a closed and empty port. Ports may be closed explicitly with Ractor::Port#close and are closed implicitly when a Ractor terminates.
port = Ractor::Port.new port.close port << "test" # Ractor::ClosedError port.receive # Ractor::ClosedError
ClosedError is a descendant of StopIteration, so the closing of a port will break out of loops without propagating the error.