Skip to content

Support async calls to rdma_get_cm_event#1

Open
akshayknarayan wants to merge 2 commits into
demikernel:mainfrom
akshayknarayan:async
Open

Support async calls to rdma_get_cm_event#1
akshayknarayan wants to merge 2 commits into
demikernel:mainfrom
akshayknarayan:async

Conversation

@akshayknarayan

Copy link
Copy Markdown

Currently, calls to rdma_get_cm_event use the default blocking behavior (and as far as I can tell, rdma_get_cm_event is the only blocking call in the library). This makes them somewhat hard to call from async contexts (have to start a thread, etc).

Conveniently, rdma_get_cm_event gives us a fd that we can set O_NONBLOCKING on, and then even more conveniently instead of having to poll that fd ourselves, tokio provides a way to hook into the epoll calls it's already making, via AsyncFd.

Having a `async_cm_events` function that consumed self caused the drop
handler to be called, which destroyed the connection state.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant