Skip to content

Commit

Permalink
Fix identifiers to be uint instead of uint64.
Browse files Browse the repository at this point in the history
  • Loading branch information
cheatfate committed Oct 21, 2021
1 parent 3bc0bc3 commit 661eae5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions chronos/asyncfutures2.nim
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ type
state*: FutureState
error*: ref CatchableError ## Stored exception
mustCancel*: bool
id*: uint64
id*: uint

when defined(chronosStackTrace):
errorStackTrace*: StackTrace
Expand Down Expand Up @@ -78,8 +78,8 @@ type
tail*: FutureBase
count*: uint

var currentID* {.threadvar.}: uint64
currentID = 0'u64
var currentID* {.threadvar.}: uint
currentID = 0'u

when defined(chronosFutureTracking):
var futureList* {.threadvar.}: FutureList
Expand Down
16 changes: 8 additions & 8 deletions tests/testutils.nim
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ suite "Asynchronous utilities test suite":
fut3.cancel()
poll()
check:
getCount() == 0'u64
pendingFuturesCount() == 0'u64
getCount() == 0'u
pendingFuturesCount() == 0'u
else:
skip()

Expand All @@ -71,17 +71,17 @@ suite "Asynchronous utilities test suite":

var fut = simpleProc()
check:
getCount() == 2'u64
pendingFuturesCount() == 2'u64
getCount() == 2'u
pendingFuturesCount() == 2'u

waitFor fut
check:
getCount() == 1'u64
pendingFuturesCount() == 1'u64
getCount() == 1'u
pendingFuturesCount() == 1'u

poll()
check:
getCount() == 0'u64
pendingFuturesCount() == 0'u64
getCount() == 0'u
pendingFuturesCount() == 0'u
else:
skip()

0 comments on commit 661eae5

Please sign in to comment.