Skip to content

Commit

Permalink
value async no side effect
Browse files Browse the repository at this point in the history
  • Loading branch information
nitely committed Nov 17, 2024
1 parent d1c1e95 commit 7107a8c
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/hyperx/value.nim
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@ type
val: T
isClosed: bool

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

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

0 comments on commit 7107a8c

Please sign in to comment.