<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Sep 19, 2011, at 3:02 PM, Fabian Rothfuchs wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Menlo; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="font-family: Calibri, sans-serif; font-size: 14px; "><div>Well no, not from<span class="Apple-converted-space"> </span><u>multiple</u><span class="Apple-converted-space"> </span>threads.</div><div>I have only two threads – one main thread, which is the Django framework, and one detached </div><div>thread for the reactor, as the reactor itself would be blocking Django.</div><div><br></div><div>All Adapters are in Django, and are reaching out to the one reactor in the thread without threading themselves.</div><div>Is this 'allowed' ?</div></span></span></blockquote></div><br><div>I guess I should have said "supported", since clearly Python allows it :).</div><div><br></div><div>This is fine - depending very heavily what you mean by "reaching out to the one reactor". Are they doing this reaching out via callFromThread (or something that calls it, like blockingCallFromThread)? That is OK. Calling reactor APIs (like connectTCP, or listenTCP, or callLater) from your Django thread will break.</div><div><br></div><div>-glyph</div><div><br></div></body></html>