Mailbox Reader Process?
Here's my attempt to show that the mailbox reader process has no particular purpose (other than for user convenience)...(defparameter mbox nil)
(defun thr1 ()
(setf mbox (mp:make-mailbox))
(mp:process-run-function "MBox Secondary Reader Process" ()
(lambda ()
(mp:mailbox-read mbox))))
;; try these one-by-one
(mp:process-run-function "Mailbox Creator Process" () 'thr1)
(inspect mbox)
(mp:mailbox-send mbox "Hello?"))
After compiling the parameter mbox and the function thr1, try executing each of the remaining three lines one at a time, while keeping the process browser open. After the first line, where we create a process to run thr1, the process browser shows "MBox Secondary Reader Process" waiting on the mailbox.
The inspect line shows that the mailbox reader process (which was the process running thr1) has died. So it is unlikely (?) that the dead process will awaken to actually perform the mailbox read on behalf of the secondary reader process. It doesn't even know about the secondary reader process, unless there is some hidden magic happening in the call to mailbox-read.
And then sending the message in the third line allows the secondary reader process to die, removing it from the process browser.
While this may not be an absolutely conclusive test, it sure appears that the mailbox-reader-process, which defaults to the creator process of the mailbox, has absolutely no particular purpose...
Is my explanation nonsense?
David McClain
Chief Technical Officer
Refined Audiometrics Laboratory
4391 N. Camino Ferreo
Tucson, AZ 85750
email: dbm@refined-audiometrics.com
phone: 1.520.390.3995