Skip to content

Commit

Permalink
wip remove future vars
Browse files Browse the repository at this point in the history
  • Loading branch information
nitely committed Dec 20, 2024
1 parent f8bd6c0 commit 0e82e83
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
14 changes: 7 additions & 7 deletions src/hyperx/limiter.nim
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ type LimiterAsync* = ref object

func newLimiter*(size: int): LimiterAsync {.raises: [].} =
doAssert size > 0
LimiterAsync(
used: 0,
size: size,
waiter: nil,
wakingUp: false,
isClosed: false
)
LimiterAsync(
used: 0,
size: size,
waiter: nil,
wakingUp: false,
isClosed: false
)

proc wakeup(lt: LimiterAsync) {.raises: [].} =
if lt.waiter == nil:
Expand Down
12 changes: 6 additions & 6 deletions src/hyperx/value.nim
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ type
isClosed: bool

func newValueAsync*[T](): ValueAsync[T] {.raises: [].} =
ValueAsync[T](
putWaiter: nil,
getWaiter: nil,
val: nil,
isClosed: false
)
ValueAsync[T](
putWaiter: nil,
getWaiter: nil,
val: nil,
isClosed: false
)

proc wakeupSoon(f: Future[void]) {.raises: [].} =
if f == nil:
Expand Down

0 comments on commit 0e82e83

Please sign in to comment.