[Openmcl-devel] process-run-function and mach ports usage

Gary Byers gb at clozure.com
Fri Feb 25 03:40:48 UTC 2011


I'm not sure that I understand the question.

Ignoring the part about conflating reference and retention, do you think
it's appropriate for the kernel to increment the port's reference count,
send a message, wait for a reply, and never decremement the reference count ?
Unless the recipient of the message takes responsibility for releasing the
reference, the reference count will just increase on every exception and
the port will never be deallocated, leading to the original problem.

It'd be a cheap shot to say that that's "consistent" or "typical", so
please forget that I did.  I haven't managed to see how it's appropriate
behavior yet, so if we're talking about the same thing it seems that we
view it very differently.

On Thu, 24 Feb 2011, Kevin Reid wrote:

> On Feb 24, 2011, at 17:02, Gary Byers wrote:
>
>> The message(s) sent to the various exception ports include the kernel
>> thread object (the port); naturally, the kernel conflates the ideas of
>> "referencing that object" with the idea of "retaining that object" in
>> this context just as it does in other contexts. It never releases that
>> reference (presumably since doing so would make at least some sense.)
>
>
> Surely this is the most appropriate behavior -- in a pure reference-counting 
> world with concurrency and no autorelease, which I assume without evidence 
> Mach ports are.
>
> -- 
> Kevin Reid                                  <http://switchb.org/kpreid/>
>
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel
>



More information about the Openmcl-devel mailing list