From afae4dce33708473d2b85b7acd5a0bf074f679f7 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 31 Jul 2018 10:44:56 -0400 Subject: 0.27.0 parallelize doc processing - std.parallelism --- org/sdp.org | 7 +++---- src/sdp/sdp.d | 5 ++--- views/version.txt | 2 +- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/org/sdp.org b/org/sdp.org index 83e0b4e..ea8a4bf 100644 --- a/org/sdp.org +++ b/org/sdp.org @@ -26,7 +26,7 @@ struct Version { int minor; int patch; } -enum ver = Version(0, 26, 6); +enum ver = Version(0, 27, 0); #+END_SRC ** compilation restrictions (supported compilers) @@ -70,6 +70,7 @@ import sdp.conf.compile_time_info, sdp.meta.metadoc; <> +import std.parallelism; <> <> /++ @@ -82,7 +83,7 @@ void main(string[] args) { <> <> if (_manifests.length > 1) { // _manifests[0] initialized dummy element - foreach(manifest; _manifests[1..$]) { + foreach(manifest; parallel(_manifests[1..$])) { if (!empty(manifest.src.filename)) { <> <> @@ -95,8 +96,6 @@ void main(string[] args) { } } } -unittest { -} #+END_SRC ** 1. pre-loop init :init: diff --git a/src/sdp/sdp.d b/src/sdp/sdp.d index 20b2228..9d91d10 100755 --- a/src/sdp/sdp.d +++ b/src/sdp/sdp.d @@ -22,6 +22,7 @@ import sdp.source.read_config_files, sdp.source.read_source_files, sdp.output.hub; +import std.parallelism; mixin(import("version.txt")); mixin CompileTimeInfo; /++ @@ -403,7 +404,7 @@ void main(string[] args) { } } if (_manifests.length > 1) { // _manifests[0] initialized dummy element - foreach(manifest; _manifests[1..$]) { + foreach(manifest; parallel(_manifests[1..$])) { if (!empty(manifest.src.filename)) { scope(success) { if (!(_opt_action.quiet)) { @@ -476,5 +477,3 @@ void main(string[] args) { } } } -unittest { -} diff --git a/views/version.txt b/views/version.txt index f9a8560..383f564 100644 --- a/views/version.txt +++ b/views/version.txt @@ -4,7 +4,7 @@ struct Version { int minor; int patch; } -enum ver = Version(0, 26, 6); +enum ver = Version(0, 27, 0); version (Posix) { version (DigitalMars) { } else version (LDC) { -- cgit v1.2.3