[Twisted-Python] Is there pb documentation somewhere?

Daniel Sank sank.daniel at gmail.com
Mon Aug 18 21:31:50 MDT 2014


Dustin,

> Adding what amounts to a use-after-free bug to the protocol seems like a
really bad idea to me.

Oh goody, a sarcastic comment which doesn't actually bother to explain the
bug :)

Since what I describe is basically WeakReferenceable, it's not obvious to
me that there's a bug. I tell you when the thing to which your
Remote(Weak)Reference points is destroyed, just like weak references invoke
finalization callbacks. If you try to invoke remote methods after than
happens I just return you an error. What's the problem? This is exactly how
weak references work.

> If your server-side app is sensitive to when objects are destroyed for
any reason aside
> from management of its memory consumption, I'd argue your app is broken.

That's a really good point. Only CPython destroys objects deterministically
when the ref count hits zero.

> Certainly it opens you to a denial of service from a malicious client,
which might hold references
> to objects you'd rather it didn't

So my instinct to keep strong references only where they're needed is just
bad? Should a GUI or a logger keep a strong reference to the things they
observe?

Daniel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20140818/96ff6e9c/attachment-0002.html>


More information about the Twisted-Python mailing list