Hey Paco,

The semantics of Scheduler's and Executor's is that only one callback will
be invoked at at time. So if you don't return from Executor.launchTask then
you won't get any more callbacks, hence the use of threading. Feel free to
use any other means of invoking the task, just as long as you can return
from Executor.launchTask in a timely fashion (read: not after the task has
finished).

Hope that helps,

Ben.


On Mon, Nov 25, 2013 at 3:46 PM, Paco Nathan <[email protected]> wrote:

> I'm building a distributed framework based on Mesos, in Python, using these
> as a basis:
>
> https://github.com/apache/mesos/blob/master/src/examples/python/test_framework.py
>
> https://github.com/apache/mesos/blob/master/src/examples/python/test_executor.py
>
> Within the executor, I need to run a service and would like to use
> gevent.wsgi
> http://www.gevent.org/gevent.wsgi.html
>
> Looking at "test_executor.py" line 48, obviously that test code uses the
> "threading" package, with conflicts with gevent, Greenlets, etc.
>
> Question:
> However, will there be any problem with Mesos conflics vs. gevent and
> libevent in general if I back out the use of "threading" and say replace
> the "run_task()" call inside of "launch_task()" as a Greenlet?
>
> I'm trying this out -- just concerned that it may lead to other problems
> somewhere down the line...  Loss of gevent would truly be a sad panda
> thing.
>
> Many thanks,
> Paco
>

Reply via email to