From 9614f0d6df9b07b9961cff293ed04e427668edca Mon Sep 17 00:00:00 2001 From: Sean McGinnis Date: Mon, 13 Apr 2020 08:58:54 -0500 Subject: Mark sphinx extensions thread safe This adds the return of some metadata to our sphinx extension setup to indicate they are thread safe. This is needed to allow consuming projects to do multithreaded docs builds. In some cases, this can save a noticeable amount of time in job execution. Change-Id: I104271bc706fc33247548a147db0af05aa88737d Signed-off-by: Sean McGinnis --- oslo_policy/sphinxext.py | 4 ++++ oslo_policy/sphinxpolicygen.py | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/oslo_policy/sphinxext.py b/oslo_policy/sphinxext.py index d8b8ce0..a6c02b6 100644 --- a/oslo_policy/sphinxext.py +++ b/oslo_policy/sphinxext.py @@ -165,3 +165,7 @@ class ShowPolicyDirective(rst.Directive): def setup(app): app.add_directive('show-policy', ShowPolicyDirective) + return { + 'parallel_read_safe': True, + 'parallel_write_safe': True, + } diff --git a/oslo_policy/sphinxpolicygen.py b/oslo_policy/sphinxpolicygen.py index 2693e34..1aef057 100644 --- a/oslo_policy/sphinxpolicygen.py +++ b/oslo_policy/sphinxpolicygen.py @@ -92,3 +92,7 @@ def setup(app): app.add_config_value('policy_generator_config_file', None, 'env') app.add_config_value('sample_policy_basename', None, 'env') app.connect('builder-inited', generate_sample) + return { + 'parallel_read_safe': True, + 'parallel_write_safe': True, + } -- cgit v1.2.1