From 6a6d433cbed63f83924d5f03810a211a501618d0 Mon Sep 17 00:00:00 2001 From: Yi Wang Date: Thu, 7 Dec 2017 16:36:14 -0800 Subject: [PATCH] Update block parent-kid relationship --- doc/design/concurrent_programming.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/design/concurrent_programming.md b/doc/design/concurrent_programming.md index 0fd37bd69..afc65e831 100644 --- a/doc/design/concurrent_programming.md +++ b/doc/design/concurrent_programming.md @@ -83,6 +83,7 @@ message ProgramDesc { } block[1] = Block { + parent = 0, vars = [x, y, index], ops = [ slice(input = [X, index], output = x) # index is initialized by parallel_for @@ -121,6 +122,7 @@ An explanation of the above program: 2. creates `len(L)` threads by calling into the `ThreadPool` singleton, each thread 1. creates an Executor instance, and 2. calls `Executor.Run(block)`, where `block` is block 1 as explained above. +1. Please be aware that block 1 is a sub-block of block 0, so ops in block 1 could refer to variables defined in block 0. ### The Worker Program -- GitLab