File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change
1
+
2
+ facts (" Async" ) do
3
+
4
+ context (" async_map" ) do
5
+ x = Input (1 )
6
+ t, y = async_map (- , 0 , x)
7
+
8
+ @fact value (t) --> nothing
9
+ @fact value (y) --> 0
10
+
11
+ push! (x, 2 )
12
+ step ()
13
+ step ()
14
+
15
+ @fact value (y) --> - 2
16
+ end
17
+ end
Original file line number Diff line number Diff line change @@ -2,7 +2,8 @@ using Reactive
2
2
3
3
# Stop the runner task
4
4
try
5
- throwto (Reactive. runner_task, InterruptException ())
5
+ println (" Killing " , Reactive. runner_task) # the task switch caused here is required!
6
+ Base. throwto (Reactive. runner_task, InterruptException ())
6
7
catch
7
8
end
8
9
@@ -11,4 +12,5 @@ include("basics.jl")
11
12
include (" call_count.jl" )
12
13
include (" flatten.jl" )
13
14
include (" time.jl" )
15
+ include (" async.jl" )
14
16
FactCheck. exitstatus ()
You can’t perform that action at this time.
0 commit comments