data: indexer processes

* TaskBuildIndex starts seperate indexer processes and communicates via shared memory
* indexer processes get restarted if they fail
* indexer processes are killed when the app closes or crashes
* added utility class SharedMemory to allocate and access shared memory, providing basic data structures
* added SharedMemoryGarbageCollector for keeping track of running instances and cleaning up shared memory in case of a crash
* show errors for source files that crashed during indexing
* added basic exception handling to task scheduling
* added option to turn off processes and use threads in preferences, but still use shared memory

fortune cookie message = Good news from someone dear is coming soon.
This commit is contained in:
Eberhard Graether
2017-05-04 15:50:59 +02:00
parent 9beea94fd8
commit 706119ebcc
109 changed files with 3351 additions and 1261 deletions
+39 -8
View File
@@ -29,6 +29,10 @@
</ProgId>
</Component>
<Component Id='SourcetrailIndexerExe' Guid='*' Win64="$(var.Win64)">
<File Id='SourcetrailIndexer' Name='sourcetrail_indexer.exe' DiskId='1' Source='$(var.PlatformSourceFolder)/sourcetrail_indexer.exe' KeyPath='yes' />
</Component>
<Component Id='Qt5CoreDll' Guid='*' Win64="$(var.Win64)">
<File Id='qt5coreDLL' Name='Qt5Core.dll' DiskId='1' Source='$(var.PlatformSourceFolder)/Qt5Core.dll' KeyPath='yes' />
</Component>
@@ -323,6 +327,12 @@
<Component Id='BookmarkViewArrowDownPng' Guid='*' Win64="$(var.Win64)">
<File Id='BookmarkViewArrowDown' Name='arrow_down.png' DiskId='1' Source='./../../../bin/app/data/gui/bookmark_view/images/arrow_down.png' KeyPath='yes' />
</Component>
<Component Id='BookmarkViewArrowLineDownPng' Guid='*' Win64="$(var.Win64)">
<File Id='BookmarkViewArrowLineDown' Name='arrow_line_down.png' DiskId='1' Source='./../../../bin/app/data/gui/bookmark_view/images/arrow_line_down.png' KeyPath='yes' />
</Component>
<Component Id='BookmarkViewArrowLineUpPng' Guid='*' Win64="$(var.Win64)">
<File Id='BookmarkViewArrowLineUp' Name='arrow_line_up.png' DiskId='1' Source='./../../../bin/app/data/gui/bookmark_view/images/arrow_line_up.png' KeyPath='yes' />
</Component>
<Component Id='BookmarkViewArrowRightPng' Guid='*' Win64="$(var.Win64)">
<File Id='BookmarkViewArrowRight' Name='arrow_right.png' DiskId='1' Source='./../../../bin/app/data/gui/bookmark_view/images/arrow_right.png' KeyPath='yes' />
</Component>
@@ -335,12 +345,6 @@
<Component Id='BookmarkViewBookmarkEditIconPng' Guid='*' Win64="$(var.Win64)">
<File Id='BookmarkViewBookmarkEditIcon' Name='bookmark_edit_icon.png' DiskId='1' Source='./../../../bin/app/data/gui/bookmark_view/images/bookmark_edit_icon.png' KeyPath='yes' />
</Component>
<Component Id='BookmarkViewBookmarkIconPng' Guid='*' Win64="$(var.Win64)">
<File Id='BookmarkViewBookmarkIcon' Name='bookmark_icon.png' DiskId='1' Source='./../../../bin/app/data/gui/bookmark_view/images/bookmark_icon.png' KeyPath='yes' />
</Component>
<Component Id='BookmarkViewBookmarkIcon2Png' Guid='*' Win64="$(var.Win64)">
<File Id='BookmarkViewBookmarkIcon2' Name='bookmark_icon_2.png' DiskId='1' Source='./../../../bin/app/data/gui/bookmark_view/images/bookmark_icon_2.png' KeyPath='yes' />
</Component>
<Component Id='BookmarkViewBookmarkListIconPng' Guid='*' Win64="$(var.Win64)">
<File Id='BookmarkViewBookmarkListIcon' Name='bookmark_list_icon.png' DiskId='1' Source='./../../../bin/app/data/gui/bookmark_view/images/bookmark_list_icon.png' KeyPath='yes' />
</Component>
@@ -383,8 +387,14 @@
<Component Id='CodeViewMinimizeInactivePng' Guid='*' Win64="$(var.Win64)">
<File Id='CodeViewMinimizeInactive' Name='minimize_inactive.png' DiskId='1' Source='./../../../bin/app/data/gui/code_view/images/minimize_inactive.png' KeyPath='yes' />
</Component>
<Component Id='CodeViewPatternPng' Guid='*' Win64="$(var.Win64)">
<File Id='CodeViewPattern' Name='pattern.png' DiskId='1' Source='./../../../bin/app/data/gui/code_view/images/pattern.png' KeyPath='yes' />
<Component Id='CodeViewPatternBrightPng' Guid='*' Win64="$(var.Win64)">
<File Id='CodeViewPatternBright' Name='pattern_bright.png' DiskId='1' Source='./../../../bin/app/data/gui/code_view/images/pattern_bright.png' KeyPath='yes' />
</Component>
<Component Id='CodeViewPatternDarkPng' Guid='*' Win64="$(var.Win64)">
<File Id='CodeViewPatternDark' Name='pattern_dark.png' DiskId='1' Source='./../../../bin/app/data/gui/code_view/images/pattern_dark.png' KeyPath='yes' />
</Component>
<Component Id='CodeViewPatternGreyPng' Guid='*' Win64="$(var.Win64)">
<File Id='CodeViewPatternGrey' Name='pattern_grey.png' DiskId='1' Source='./../../../bin/app/data/gui/code_view/images/pattern_grey.png' KeyPath='yes' />
</Component>
<Component Id='CodeViewSnippetActivePng' Guid='*' Win64="$(var.Win64)">
<File Id='CodeViewSnippetActive' Name='snippet_active.png' DiskId='1' Source='./../../../bin/app/data/gui/code_view/images/snippet_active.png' KeyPath='yes' />
@@ -414,12 +424,33 @@
<Component Id='BundlePng' Guid='*' Win64="$(var.Win64)">
<File Id='Bundle' Name='bundle.png' DiskId='1' Source='./../../../bin/app/data/gui/graph_view/images/bundle.png' KeyPath='yes' />
</Component>
<Component Id='DefaultPng' Guid='*' Win64="$(var.Win64)">
<File Id='Default' Name='default.png' DiskId='1' Source='./../../../bin/app/data/gui/graph_view/images/default.png' KeyPath='yes' />
</Component>
<Component Id='EnumPng' Guid='*' Win64="$(var.Win64)">
<File Id='Enum' Name='enum.png' DiskId='1' Source='./../../../bin/app/data/gui/graph_view/images/enum.png' KeyPath='yes' />
</Component>
<Component Id='FilePng' Guid='*' Win64="$(var.Win64)">
<File Id='File' Name='file.png' DiskId='1' Source='./../../../bin/app/data/gui/graph_view/images/file.png' KeyPath='yes' />
</Component>
<Component Id='GraphPng' Guid='*' Win64="$(var.Win64)">
<File Id='Graph' Name='graph.png' DiskId='1' Source='./../../../bin/app/data/gui/graph_view/images/graph.png' KeyPath='yes' />
</Component>
<Component Id='GraphArrowPng' Guid='*' Win64="$(var.Win64)">
<File Id='GraphArrow' Name='graph_arrow.png' DiskId='1' Source='./../../../bin/app/data/gui/graph_view/images/graph_arrow.png' KeyPath='yes' />
</Component>
<Component Id='GraphDownPng' Guid='*' Win64="$(var.Win64)">
<File Id='GraphDown' Name='graph_down.png' DiskId='1' Source='./../../../bin/app/data/gui/graph_view/images/graph_down.png' KeyPath='yes' />
</Component>
<Component Id='GraphLeftPng' Guid='*' Win64="$(var.Win64)">
<File Id='GraphLeft' Name='graph_left.png' DiskId='1' Source='./../../../bin/app/data/gui/graph_view/images/graph_left.png' KeyPath='yes' />
</Component>
<Component Id='GraphRightPng' Guid='*' Win64="$(var.Win64)">
<File Id='GraphRight' Name='graph_right.png' DiskId='1' Source='./../../../bin/app/data/gui/graph_view/images/graph_right.png' KeyPath='yes' />
</Component>
<Component Id='GraphUpPng' Guid='*' Win64="$(var.Win64)">
<File Id='GraphUp' Name='graph_up.png' DiskId='1' Source='./../../../bin/app/data/gui/graph_view/images/graph_up.png' KeyPath='yes' />
</Component>
<Component Id='MacroPng' Guid='*' Win64="$(var.Win64)">
<File Id='Macro' Name='macro.png' DiskId='1' Source='./../../../bin/app/data/gui/graph_view/images/macro.png' KeyPath='yes' />
</Component>
+15 -4
View File
@@ -166,11 +166,13 @@
<!-- Application Folder Stuff -->
<ComponentRef Id='MainExecutable'/>
<ComponentRef Id='ApplicationShortcut'/>
<ComponentRef Id='DesktopShortcut'/>
<ComponentRef Id='UninstallShortcut'/>
<ComponentRef Id='SourcetrailIndexerExe'/>
<ComponentRef Id='Qt5CoreDll'/>
<ComponentRef Id='Qt5GuiDll'/>
<ComponentRef Id='Qt5NetworkDll'/>
@@ -253,12 +255,12 @@
<ComponentRef Id='BookmarkViewCss'/>
<ComponentRef Id='BookmarkViewArrowDownPng'/>
<ComponentRef Id='BookmarkViewArrowLineDownPng'/>
<ComponentRef Id='BookmarkViewArrowLineUpPng'/>
<ComponentRef Id='BookmarkViewArrowRightPng'/>
<ComponentRef Id='BookmarkViewBookmarkActivePng'/>
<ComponentRef Id='BookmarkViewBookmarkDeleteIconPng'/>
<ComponentRef Id='BookmarkViewBookmarkEditIconPng'/>
<ComponentRef Id='BookmarkViewBookmarkIconPng'/>
<ComponentRef Id='BookmarkViewBookmarkIcon2Png'/>
<ComponentRef Id='BookmarkViewBookmarkListIconPng'/>
<ComponentRef Id='BookmarkViewEditBookmarkIconPng'/>
@@ -272,7 +274,9 @@
<ComponentRef Id='CodeViewMaximizeInactivePng'/>
<ComponentRef Id='CodeViewMinimizeActivePng'/>
<ComponentRef Id='CodeViewMinimizeInactivePng'/>
<ComponentRef Id='CodeViewPatternPng'/>
<ComponentRef Id='CodeViewPatternBrightPng'/>
<ComponentRef Id='CodeViewPatternDarkPng'/>
<ComponentRef Id='CodeViewPatternGreyPng'/>
<ComponentRef Id='CodeViewSnippetActivePng'/>
<ComponentRef Id='CodeViewSnippetInactivePng'/>
@@ -281,8 +285,15 @@
<ComponentRef Id='GraphViewCss'/>
<ComponentRef Id='ArrowGraphPng'/>
<ComponentRef Id='BundlePng'/>
<ComponentRef Id='DefaultPng'/>
<ComponentRef Id='EnumPng'/>
<ComponentRef Id='FilePng'/>
<ComponentRef Id='GraphPng'/>
<ComponentRef Id='GraphArrowPng'/>
<ComponentRef Id='GraphDownPng'/>
<ComponentRef Id='GraphLeftPng'/>
<ComponentRef Id='GraphRightPng'/>
<ComponentRef Id='GraphUpPng'/>
<ComponentRef Id='MacroPng'/>
<ComponentRef Id='NamespacePng'/>
<ComponentRef Id='GraphPatternPng'/>