Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add non-blocking wait #766

Merged
merged 7 commits into from
Sep 13, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add non-blocking wait
  • Loading branch information
luraess committed Sep 6, 2023
commit e3cbe27a924aeadf8e941f446d8f5cadc8f8e622
11 changes: 11 additions & 0 deletions src/nonblocking.jl
Original file line number Diff line number Diff line change
Expand Up @@ -774,3 +774,14 @@ function Cancel!(req::AbstractRequest)
API.MPI_Cancel(req)
nothing
end

"""
Base.wait(req::MPI.Request)

Non-blocking wait. This will yield to other (Julia) tasks while blocking in a spin loop.
"""
function Base.wait(req::MPI.Request)
while !MPI.Test(req)
yield()
end
end