Skip to content

Commit 926fdce

Browse files
committed
adjust async
1 parent 1546d0b commit 926fdce

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

rvk/execute.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,18 +53,17 @@ template<typename F>
5353
requires Invocable<F, Commands&>
5454
auto async(Async::Pool<>& pool, F&& f, Queue_Family family, u32 index)
5555
-> Async::Task<Invoke_Result<F, Commands&>> {
56+
co_await pool.suspend();
5657
auto fence = make_fence();
5758
auto cmds = make_commands(family);
5859
if constexpr(Same<Invoke_Result<F, Commands&>, void>) {
5960
forward<F>(f)(cmds);
6061
submit(cmds, index, fence);
6162
co_await pool.event(fence.event());
62-
fence.wait();
6363
} else {
6464
auto ret = forward<F>(f)(cmds);
6565
submit(cmds, index, fence);
6666
co_await pool.event(fence.event());
67-
fence.wait();
6867
co_return ret;
6968
}
7069
}

0 commit comments

Comments
 (0)