Re: investigation into replacing ref. counts with leases



Darin Adler <darin bentspoon com> writes: 
> The problem I ran into is that extending the leases from client processes seems to
> require some kind of regular timer. The glib timeout is not satisfactory because
> it's tied to the event loop, and I'm not sure what I should use for
> the timer.

Keeping in mind my earlier statement about in-process
vs. out-of-process - the timer in an event loop is probably fine for
renewing out-of-process leases, but I can't imagine any timer that
would be remotely a good idea for in-process objects.

Thinking of this as a garbage collection algorithm, its properties
are either:

 - uncollected garbage can grow without bound as you are doing the
   work of your program, if your GC happens only in an event loop or
   the like

or 

 - unlimited reentrancy headaches, as the GC can free any object at
   any time (if you do the timeout via threads or something)

So leases are wholly inappropriate for small, pervasive objects.  Of
course at the moment Bonobo objects are really too heavy for this use
anyhow; even GObject is nearly too heavy for that, and the current
Bonobo implementation is at least as heavy as GObject for obvious
reasons.

So you really want to stick to refcounting (or real GC) for
in-process objects...

Havoc





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]