[Twisted-Python] Application Design help - Concurrent but not Protocols based.

glyph at divmod.com glyph at divmod.com
Wed Jun 3 22:27:47 EDT 2009

On 3 Jun, 04:25 pm, orsenthil at gmail.com wrote:
>My Question: Can this be designed in way that looking for new files is
>also asynchronous activity?

>What will be the deferred in this case?

>Now, after reading the contents, I will have to do a non-blocking call
>to fetch data, either using fun_a, fun_b or fun_b. How should I
>associate this requirement to deferred/callback pattern?

I don't think that you want to have a Deferred here.  I think you just 
want a callback for when files change, similar to the way IProtocol 
simply gets a callback when data arrives.
>Any guidance would be helpful.

Have you looked at any of the various attempts to add asynchronous file 
notification support to Twisted?  To get truly asynchronous notification 
(not timed polling) you will need something like this:


More information about the Twisted-Python mailing list