Ensure callback variable capture + cleanup is done correctly
It appears the the callback variable that was being called on
future done was not the right one, due to the lambda capture
mechanism referring to a lazy variable which would potentially
be a different callback by the time the future would finish so
make sure we capture the right one and ensure the future has access
to it.
This adds a helper method that submission will go through
to ensure that the callback variable is correctly captured
in the created lambda and also ensures that the incomplete futures
list is cleaned up (when the future is done).
The notification listener tests use now eventlet to show up this
issue that doesn't occur with blocking executor.
Reviewed: https:/ /review. openstack. org/202202 /git.openstack. org/cgit/ openstack/ oslo.messaging/ commit/ ?id=02a3a398145 c4923915f7eaa5e 601d6f970df403
Committed: https:/
Submitter: Jenkins
Branch: master
commit 02a3a398145c492 3915f7eaa5e601d 6f970df403
Author: Joshua Harlow <email address hidden>
Date: Wed Jul 15 10:26:06 2015 -0700
Ensure callback variable capture + cleanup is done correctly
It appears the the callback variable that was being called on
future done was not the right one, due to the lambda capture
mechanism referring to a lazy variable which would potentially
be a different callback by the time the future would finish so
make sure we capture the right one and ensure the future has access
to it.
This adds a helper method that submission will go through
to ensure that the callback variable is correctly captured
in the created lambda and also ensures that the incomplete futures
list is cleaned up (when the future is done).
The notification listener tests use now eventlet to show up this
issue that doesn't occur with blocking executor.
Closes-bug: #1474943
Closes-bug: #1475307
Change-Id: I23e393d5046625 32572b5b344b873 87be6d7bcb1