[openstack-dev] [ceilometer] The periodic task on openstack

Jiang, Yunhong yunhong.jiang at intel.com
Sat Nov 17 02:44:31 UTC 2012


> > Its almost as if we'd want the standard libs to be unmonkey-patched
> > when executing on real threads so as to avoid needlessly yielding and
> > hence chewing up more elapsed time to task completion (if that makes
> > any sense ...).
> 
> That's a good question.  Eventlet provides a threadpool implementation
> that we could use for this, so if going that route I think it's all good.
> 
> http://eventlet.net/doc/threading.html#tpool-simple-thread-pool

According to the doc, "A key restriction is that the object's methods should not switch greenlets or use Eventlet primitives, since they are in a different thread from the main hub, and therefore might behave unexpectedly" and I assume this should apply to the eventlet.tpool.execute() also?

--jyh

> 
> --
> Russell Bryant
> 
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev



More information about the OpenStack-dev mailing list