I see pointers being used with next and last, are these mailboxes unbounded?
Would bounded mailboxes (with upper limits) be desirable to circumvent a situation when the consumer is too slow and the mailboxes just grows ad infinitum?
This way you could ring buffers could be used with linear memory layout.
yes, because main purpose is inter-thread communication
if i should send message i’ll send message
regarding limitations/backpressure and similar requirements i use different mechanism - pool:
before send message you allocate it via pool and will get error if pool is empty
(and as result - nothing to send)
If Pool is pool of jobs - you will not submit new job , because all possible jobs are in processing