summaryrefslogtreecommitdiff
path: root/grc/python/Platform.py
diff options
context:
space:
mode:
authorSebastian Koslowski <koslowski@kit.edu>2015-09-23 16:40:54 +0200
committerSebastian Koslowski <koslowski@kit.edu>2015-11-13 21:49:09 +0100
commit95287379e1ac7fa2f0bb92d7b17f754ad8bfe674 (patch)
tree94ad35530c4244a0a3ce4cc664e0c6d91eb00c44 /grc/python/Platform.py
parentd15065de35a535eae9448dff60270053f35885bd (diff)
grc: finish doc_string extraction in the background (faster start-up)
Diffstat (limited to 'grc/python/Platform.py')
-rw-r--r--grc/python/Platform.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/grc/python/Platform.py b/grc/python/Platform.py
index 56986773b5..4a32888894 100644
--- a/grc/python/Platform.py
+++ b/grc/python/Platform.py
@@ -41,7 +41,6 @@ COLORS = [(name, color) for name, key, sizeof, color in CORE_TYPES]
class Platform(_Platform, _GUIPlatform):
-
def __init__(self):
"""
Make a platform for gnuradio.
@@ -53,6 +52,7 @@ class Platform(_Platform, _GUIPlatform):
os.mkdir(os.path.dirname(PREFS_FILE))
self.block_docstrings = block_docstrings = dict()
+ self.block_docstrings_loaded_callback = lambda: None
def setter(key, docs):
block_docstrings[key] = '\n\n'.join(
@@ -60,7 +60,10 @@ class Platform(_Platform, _GUIPlatform):
for b, d in docs.iteritems() if d is not None
)
- self._docstring_extractor = extract_docs.SubprocessLoader(setter)
+ self._docstring_extractor = extract_docs.SubprocessLoader(
+ callback_query_result=setter,
+ callback_finished=lambda: self.block_docstrings_loaded_callback()
+ )
# init
_Platform.__init__(
@@ -97,7 +100,7 @@ class Platform(_Platform, _GUIPlatform):
self._docstring_extractor.start()
_Platform.load_blocks(self)
self._docstring_extractor.finish()
- self._docstring_extractor.wait()
+ # self._docstring_extractor.wait()
def load_block_xml(self, xml_file):
block = _Platform.load_block_xml(self, xml_file)