Did you tried twisted?

http://twistedmatrix.com/projects/core/documentation/howto/async.html

On 2/9/07, Dill0r <[EMAIL PROTECTED]> wrote:
>
>
> Hi,
>
> i got a producer-consumer class which await new items from the
> clients, does sth with them and provides them to all clients.
>
> the url "getNewItems" is for getting the new Items and vice versa.
>
> my problem is: when i wait for new items, i cant get new, cause this
> stuff is all in one thread.
> is there a way to save the request so i can send a response later
> (when the are new items).
> or maybe i could start 2 threads per client or sth ...!?
>
> any idea?
>
>
> from foo import producerConsumer
>
> def getNewItems(request):
>    p = producerConsumer()
>    newItems = p.consume() # wating for new items here
>    return HttpRespone(newItems)
>
>
> def putNewItem(request):
>    p = producerConsumer()
>    p.produce(request.__getItem__("item")) # notifyAll here
>    #no response needed here
>
>
> >
>


-- 
Julián

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to