When using oslo.messaging library for notification listener, one can use
either blocking or eventlet, when using eventlet as the executor, for some
reason, these threads in greenpool will block until all threads get a task
to run, then some of the thread will run. Here is the program to reproduce
the behavior:
from oslo.config import cfg
from oslo import messaging
import logging
class InfoEndpoint(object):
def info(self, ctxt, publisher_id, event_type, payload, metadata):
logging.log(payload)
transport = messaging.get_transport(cfg.CONF)
targets = [
messaging.Target(exchange='nova', topic='notifications')
]
endpoints = [
InfoEndpoint(),
]
server = messaging.get_notification_listener(transport, targets,
endpoints,
executor='eventlet')
server.start()
server.wait()
Can anyone please explain why it behaves that way?
Tong Li
OpenStack Community Development
Building 501/B205
liton...@us.ibm.com
_______________________________________________
Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
Post to : openstack@lists.openstack.org
Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack