summaryrefslogtreecommitdiff
path: root/oslo_messaging/opts.py
diff options
context:
space:
mode:
authorMehdi Abaakouk <mehdi.abaakouk@enovance.com>2015-01-16 15:17:56 +0100
committerMehdi Abaakouk <sileht@redhat.com>2015-07-08 13:42:10 +0200
commitc49594a62fc62caa2dab24dac3163ee49dc775bb (patch)
treed5ae013dafb436f245fd5d0ffc67dea7ea84057a /oslo_messaging/opts.py
parent3b891fcfcb1b40089283941c1126da296af1074b (diff)
downloadoslo-messaging-c49594a62fc62caa2dab24dac3163ee49dc775bb.tar.gz
Remove usage of contentmanager for executors
The context manager in the executor fit only for the blocking executor. Even the dispatcher needs to run code before and after the application callback, eventlet and future executors have to run the pre/post code into the main thread and can run the callback into an other thread, and that force them to run __enter__ and __exit__ manually and deal the exception path. This change adds a helper object instead of the context manager. It is designed to be explicit on what must be executed before and after the callback and what can be done in a thread or not. All the executor code is now in the impl_pooledexecutor.py and use the futures "PoolExecutor" API. This use futurist to provide a eventlet and aioeventlet futures friendly object. Change-Id: I8cd7640f36beeda47560e3c82671bad3530e38d1
Diffstat (limited to 'oslo_messaging/opts.py')
-rw-r--r--oslo_messaging/opts.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/oslo_messaging/opts.py b/oslo_messaging/opts.py
index 5911b69..1f065b5 100644
--- a/oslo_messaging/opts.py
+++ b/oslo_messaging/opts.py
@@ -29,7 +29,7 @@ from oslo_messaging._drivers import matchmaker
from oslo_messaging._drivers import matchmaker_redis
from oslo_messaging._drivers import matchmaker_ring
from oslo_messaging._drivers.protocols.amqp import opts as amqp_opts
-from oslo_messaging._executors import base
+from oslo_messaging._executors import impl_pooledexecutor
from oslo_messaging.notify import notifier
from oslo_messaging.rpc import client
from oslo_messaging import transport
@@ -38,7 +38,7 @@ _global_opt_lists = [
drivers_base.base_opts,
impl_zmq.zmq_opts,
matchmaker.matchmaker_opts,
- base._pool_opts,
+ impl_pooledexecutor._pool_opts,
notifier._notifier_opts,
client._client_opts,
transport._transport_opts,