On Tue, Aug 18, 2009 at 2:35 AM, Andrew Gomilko<[email protected]> wrote:
> But, how would you suggest coping with this on client side?

I was assuming a single-threaded client with an event loop such as
twisted, EventMachine, or libevent.

See http://github.com/dj2/jack for an example. Their documentation says:

# One thing to keep in mind. The Beanstalk protocol executes
# all commands serially. So, if you send a reserve command
# and there are no jobs Beanstalk _won‘t_ process any of the
# commands that come after the reserve until the reserve
# completes.

One could think of this feature as an attempt to fix that problem.

> For
> example let's
> see this snippet:
>
> job = client.reserve()
>
> When you execute this command, client is blocked (at least in python
> and java implementations)
> and waits for a response.

Yes, in that situation, this feature would be unavailable. I wouldn't
recommend doing anything tricky with multiple threads.

kr

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"beanstalk-talk" 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/beanstalk-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to