-
Notifications
You must be signed in to change notification settings - Fork 21
/
weave.nim
40 lines (38 loc) · 1.29 KB
/
weave.nim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Weave
# Copyright (c) 2019 Mamy André-Ratsimbazafy
# Licensed and distributed under either of
# * MIT license (license terms in the root directory or at http://opensource.org/licenses/MIT).
# * Apache v2 license (license terms in the root directory or at http://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed except according to those terms.
import
weave/[
parallel_tasks, parallel_for, parallel_for_staged,
runtime],
weave/state_machines/[sync_root, sync, sync_scope],
weave/datatypes/flowvars,
weave/cross_thread_com/flow_events,
weave/contexts,
weave/[executor, parallel_jobs]
export
Flowvar, Weave,
spawn, sync, syncRoot,
parallelFor, parallelForStrided,
init, exit,
loadBalance,
isSpawned, isReady,
getThreadId, getNumThreads,
# Experimental threadlocal prologue/epilogue
parallelForStaged, parallelForStagedStrided,
# Experimental scope barrier
syncScope,
# Experimental dataflow parallelism
spawnOnEvent, spawnOnEvents, FlowEvent,
trigger, newFlowEvent,
# Experimental background service
Pending,
submit, submitOnEvent, submitOnEvents,
runInBackground, waitUntilReady,
setupSubmitterThread, teardownSubmitterThread,
waitFor, isSubmitted,
processAllandTryPark,
runForever, runUntil