On Fri, Jan 29, 2010 at 12:11:33PM -0800, [email protected] wrote:
> I believe that locking still needs to stay in the close() path, but
> Danek proposed a solution where orphaned requests are placed in a list
> or dictionary and cleaned up later.  It seems like that may be the only
> sane way to solve this problem for the __del__ case.  I think that this
> list/dictionary should still be manipulated under a lock, so that
> asynchronous __del__'s don't race with a caller removing processed URLs
> from the object.  
> 
> Does this sound like a sane solution?

Okay.  Hopefully this is the last time this fix needs a major overhaul.

        http://cr.opensolaris.org/~johansen/webrev-14240-4/

As I described earlier, I changed the fileobj to put the information
about the orphaned request in a list.  The transport then performs
deferred cleanup on items in this list.  The __del__ path uses this
method, but close() still takes the direct approach.  Since it's
possible to have multiple requests with the same URL in progress at
once, I had to add a uuid to each file object, so I could remove only
its requests.

-j
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to