Relationships and dispatch
What is message passing?
On this page
A sender asks a receiver to perform an operation and leaves the receiver to interpret the request. A Smalltalk message can be delivered within one process. A distributed actor message may cross a network. Delivery, ordering and failure guarantees must be specified separately for the latter.
Worked example
Pythonfrom queue import Queue
mailbox = Queue()
mailbox.put(("resize", 256))
operation, width = mailbox.get()
assert operation == "resize" and width == 256Explore class relationships in the OOP Playground