<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On May 19, 2014, at 2:29 AM, Laurens Van Houtven <_@lvh.io> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, May 19, 2014 at 12:19 AM, Glyph <span dir="ltr"><<a href="mailto:glyph@twistedmatrix.com" target="_blank">glyph@twistedmatrix.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto;"><div style="word-wrap:break-word">I think this is the sort of thing that should move into Twisted itself, eventually.  Thoughts?<br>

</div></blockquote><div><br></div><div>I agree! There's a few things I'd like to work out with the freedom to break things of a v0.x.x semver version before that happens though.<br></div></div></div></div></blockquote><div><br></div><div>Oh, definitely.  Hence: eventually.</div><br><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Notably, this thing assumes that all attribute accesses are thread-safe and synchronous. That's often true, but hey, this is Python, so you get to do whatever you want when you access an attribute (and @property even makes it easy to do so). Also because right now I'm suggesting a pool with a singled thread for synchronized access to an object that isn't thread safe; especially if you *know* the object isn't thread safe you probably want something to take care of attribute access too :-)</div></div></div></div></blockquote><br></div><div>Just write a decorator that programmatically verifies that everything about the attribute it's decorating is thread-safe.  Simple!  ;-)</div><div><br></div><div>-g</div></body></html>