Skip to content

Commit 69d0a92

Browse files
authored
fix: remove deprecated await in channel. (#349)
1 parent 76e4b2c commit 69d0a92

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lua/plenary/async/control.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ end
7474
---async function, blocks until a permit can be acquired
7575
---example:
7676
---local semaphore = Semaphore.new(1024)
77-
---local permit = await(semaphore:acquire())
77+
---local permit = semaphore:acquire()
7878
---permit:forget()
7979
---when a permit can be acquired returns it
8080
---call permit:forget() to forget the permit
@@ -176,14 +176,14 @@ M.channel.counter = function()
176176

177177
Receiver.recv = function()
178178
if counter == 0 then
179-
await(condvar:wait())
179+
condvar:wait()
180180
end
181181
counter = counter - 1
182182
end
183183

184184
Receiver.last = function()
185185
if counter == 0 then
186-
await(condvar:wait())
186+
condvar:wait()
187187
end
188188
counter = 0
189189
end

0 commit comments

Comments
 (0)