Skip to content

Commit 14848f2

Browse files
committed
semantics: ascertain -> postCondition
1 parent 76cc7fd commit 14848f2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

weave/cross_thread_com/channels_mpsc_unbounded_batch.nim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ proc tryRecv*[T, keepCount](chan: var ChannelMpscUnboundedBatch[T, keepCount], d
141141

142142
when keepCount:
143143
let oldCount {.used.} = chan.count.fetchSub(1, moRelaxed)
144-
ascertain: oldCount >= 1 # The producers may overestimate the count
144+
postCondition: oldCount >= 1 # The producers may overestimate the count
145145
return true
146146
# End fast-path
147147

@@ -160,7 +160,7 @@ proc tryRecv*[T, keepCount](chan: var ChannelMpscUnboundedBatch[T, keepCount], d
160160

161161
when keepCount:
162162
let oldCount {.used.} = chan.count.fetchSub(1, moRelaxed)
163-
ascertain: oldCount >= 1 # The producers may overestimate the count
163+
postCondition: oldCount >= 1 # The producers may overestimate the count
164164
return true
165165

166166
# We lost but now we know that there is an extra node coming very soon
@@ -182,7 +182,7 @@ proc tryRecv*[T, keepCount](chan: var ChannelMpscUnboundedBatch[T, keepCount], d
182182

183183
when keepCount:
184184
let oldCount {.used.} = chan.count.fetchSub(1, moRelaxed)
185-
ascertain: oldCount >= 1 # The producers may overestimate the count
185+
postCondition: oldCount >= 1 # The producers may overestimate the count
186186
return true
187187

188188
# # Alternative implementation

0 commit comments

Comments
 (0)