Hi Juliusz,

Thanks for the explanation, very helpful. However, I have few more
confusions:

1. When an object is first created, presumably because of a client request,
is it private or public?

2. Is it possible that polipo holds two objects that both pointing to the
same URL? E.g. two request from clients to the same url hit the polipo at
the same time. The first object has not yet being fully constructed, so it
is not searchable by the second request. Thus a second object to the same
url is created for the second request.

3. What can trigger an object's state to transit between public and private?

4 What happens when there is a collision to the MD5 hashed filename in the
cache?

Best Regards,
Ming



On Thu, May 29, 2008 at 9:15 AM, Juliusz Chroboczek <
[EMAIL PROTECTED]> wrote:

> > Is there any document explains the difference about private and public
> > objects in polipo?
>
> A public object sits in the objectHashTable.
>
> A private object is not in the global hash table, so no new references
> to it can be created.  Its reference count can only decrease, so it
> will eventually be freed.
>
> Let me explain.  There are two kinds of references to an object: hard
> references, which come from other data structures (connections,
> requests etc.) and are reference-counted, and soft references, which
> come from the global hash table and are not reference-counted.
>
> A private object is just one that doesn't have any soft references.
> You should not in general call destroyObject, since this could corrupt
> Polipo's data structures; instead, call privatizeObject, which will
> cause the object to be freed as soon as its reference count drops to 0.
>
>                                        Juliusz
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Polipo-users mailing list
Polipo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/polipo-users

Reply via email to