Re: [Twisted-Python] Crochet 1.5.0: Use Twisted in Django, Flask, or anywhere else

2016-04-14 Thread Itamar Turner-Trauring

On 04/13/2016 10:57 PM, Glyph wrote:

One advantage of having this directly supported in Twisted, then, would be 
calling no_setup() (or equivalent) early on in 'twistd' and equivalent tools, 
so that crochet-using modules could be imported as part of a twisted-native 
plugin?
That would be pretty cool, yes, although it doesn't strictly require 
Crochet be part of Twisted.

It might also be able to have a slightly different API.  For example, maybe 
setup() or some analogue thereof could set up an 'atexit' hook that runs the 
reactor if nobody gets around to calling run() before it exits?

Huh. Well... Crochet exits when main thread exits, so if atexit was 
called that means there's no more threads. So that probably wouldn't work.


More broadly, Crochet is a pile of these sort of horrible hacks, 
encapsulated in one place and hidden as much as possible. But there's 
rough edges that poke out occasionally. I'm not sure Twisted ought to be 
that kind of library.



___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] Crochet 1.5.0: Use Twisted in Django, Flask, or anywhere else

2016-04-14 Thread Glyph

> On Apr 14, 2016, at 5:45 AM, Itamar Turner-Trauring  
> wrote:
> 
> Crochet is a pile of these sort of horrible hacks, encapsulated in one place 
> and hidden as much as possible. But there's rough edges that poke out 
> occasionally. I'm not sure Twisted ought to be that kind of library.


We already have an IMAP server so I feel like that ship may have sailed ;-)

-g___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python