Why threads order yields different results for fork...join_none?

In reply to mlsxdx:

Because of the way you coded your consumer task, if it executes before any producer gets a chance to put anything it the mailbox, the loop has a #1 before it checks the mailbox num() method again.

There is no reason to have this check as the get() blocks until there is something in the mailbox. In general, it is never a good idea to add #1’s to your code.