Mailbox - old new way of inter-thread communication

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.

9 Likes

Great, we did that in the late 90s when we connected local PCs to the old mainframes. It always worked. :grinning:

3 Likes