Skip to content

Commit

Permalink
0.0.3: add tock to ci
Browse files Browse the repository at this point in the history
  • Loading branch information
disruptek committed Jul 22, 2020
1 parent d4b93e9 commit 10186fd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion cps.nimble
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "0.0.2"
version = "0.0.3"
author = "disruptek"
description = "continuation-passing style"
license = "MIT"
Expand All @@ -19,3 +19,4 @@ proc execTest(test: string) =

task test, "run tests for travis":
execTest("tests/test.nim")
execTest("tests/tock.nim")
6 changes: 3 additions & 3 deletions tests/tock.nim
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import cps/eventqueue # cps_sleep(), trampoline, run(), Cont

# a procedure that starts off synchronous and becomes asynchronous
proc tock(name: string; interval: Duration): Cont {.cps.} =
var count: int = 0
while true:
inc count
var count: int = 20
while count > 0:
dec count
# this primitive sends the continuation to the dispatcher
cps_sleep interval
# this is executed from the dispatcher
Expand Down
2 changes: 1 addition & 1 deletion tests/tock.nim.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
--threads:on
--define:threadsafe
--gc:arc
--define:cpsDebug
#--define:cpsDebug

0 comments on commit 10186fd

Please sign in to comment.