Make workers consumers monitoring optional #10

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
5 participants

gbour commented Jun 21, 2012

Hi, Great lib.

I needed not to monitor workers consumers, so I moved it as an option ("monitor").

Regards.

ivlis commented May 7, 2013

Update to lastest version in this commit aac5543
I think this is a very useful feature, why it is not merged still?

Collaborator

Vagabond commented Jun 13, 2013

Why is this useful? Isn't there the potential to leak workers if you turn it off?

Owner

devinus commented Jun 13, 2013

@Vagabond Yeah, basically if the consumer dies the worker will never be returned, deadlocking the pool.

Collaborator

Vagabond commented Jun 13, 2013

So, can we close this as DONOTWANT?

Owner

devinus commented Jun 13, 2013

@Vagabond Yeah, I kept it open as a reminder that Poolboy could support a feature like this without exhausting the pool. E.g. automatically replenishing it, or something. But I think it's bad form to keep this PR open much longer without an explanation and a closing, so there it is.

devinus closed this Jun 13, 2013

ivlis commented Jun 13, 2013

Hey guys, not so fast! :) I just had no time to answer.

There is a clear reason why it should be this option.

Imagine a web service e.g. running by cowboy. A user starts some long term task to be complied. The task is implemented as process, taken from a pool. If there is no such option, the task will be killed after cowboy finish with a request, but this is definitely not we want. If there is an option not to monitor the task it will die at the end of execution, as expected. Of course, we can add a "master" process which will start all workers by a request from cowboy, but it will be a clear bottleneck.

Anyway, it is an OPTIONAL feature, why not to add it?

Imagine a web service e.g. running by cowboy. A user starts some long term task to be complied. The task is implemented as process, taken from a pool. If there is no such option, the task will be killed after cowboy finish with a request, but this is definitely not we want. If there is an option not to monitor the task it will die at the end of execution, as expected. Of course, we can add a "master" process which will start all workers by a request from cowboy, but it will be a clear bottleneck.

Why start those processes through poolboy at all?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment