Mailboxes are one of the fundamental parts of the actor model originated in 1973.
If your thread runs in “Fire and Forget” mode, you don’t need Mailbox.
But in the real multithreaded application, threads communicate with each other as members of work team.
Mailbox provides convenient and simple communication mechanism.
I have used it in:
- iRMX - PL/M-86
- AIX - C
- Windows - C++/C#
- Linux - Go
Now it’s Zig time!!!
Stop reading and start playing
And don’t forget “First rule of multithreading”:
If you can do without multithreading - do without.