Skip to content

Commit

Permalink
Properly assert the size of TaskNode on 32-bit
Browse files Browse the repository at this point in the history
  • Loading branch information
mratsim committed Feb 4, 2020
1 parent 907c3bb commit 87013fc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion weave/channels/pledges.nim
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,11 @@ macro delayedUntilMulti*(task: Task, pool: var TLPoolAllocator, pledges: varargs
# Sanity checks
# ------------------------------------------------------------------------------

assert sizeof(default(TaskNode)[]) == 40,
when sizeof(pointer) == 8:
let expectedSize = 40
else:
let expectedSize = 20
assert sizeof(default(TaskNode)[]) == 20,
"TaskNode size was " & $sizeof(default(TaskNode)[])

assert sizeof(ChannelMpscUnboundedBatch[TaskNode]) == 128,
Expand Down

0 comments on commit 87013fc

Please sign in to comment.