<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:40 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>That’s a&nbsp;tremendous advice!</div><div>Indeed I was directly calling connectTCP() - I changed it to do like&nbsp;<span class="Apple-style-span" style="font-family: Monaco; font-size: 11px; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span></div><div><span class="Apple-style-span" style="font-family: Monaco; font-size: 11px; "><br></span></div><div><span class="Apple-style-span" style="font-family: Monaco; font-size: 11px; ">reactor.<span style="text-decoration: underline; ">callFromThread</span>(reactor.<span style="text-decoration: underline; ">connectTCP</span>, host, port, factory, timeout=<span style="color: rgb(138, 20, 7); ">5</span>)</span></div><div><span class="Apple-style-span" style="font-family: Monaco; font-size: 11px; "><br></span></div><div><span class="Apple-style-span" style="font-family: Monaco; font-size: 11px; ">Thanks!</span></div></span></span></blockquote><br></div><div>No problem! &nbsp;I'm glad I caught this before it caused you serious trouble.</div><div><br></div><div>Tell your friends: threads are bad! &nbsp;callFromThread is your best and only defense against the Dark Arts! :)</div><div><br></div><div>-glyph</div><div><br></div></body></html>