https://github.com/GoogleCloudPlatform/google-cloud-python/blob/4e17158c0f14e0e91cbeb74c3e8483c5a231e9ac/pubsub/google/cloud/pubsub_v1/subscriber/policy/thread.py#L147
While testing out the new PubSub API (v 0.28.3), I noticed that the default thread-based Policy, which uses a ThreadPoolExecutor(max_workers=10) seemed to be executing the subscriber callbacks sequentially, instead of asynchronously. Upon introspection of the source, it looks like the above referenced code:
...
future = self._executor.submit(self._callback, message)
logger.debug('Result: %s' % future.result())
will block until self._callback completes, because of the call to future.result(). Or am I losing my mind? Thanks!