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

Make worker-control's _chan_buf_send implementation to use resource event loop #62

Open
prajnoha opened this issue Feb 15, 2021 · 0 comments

Comments

@prajnoha
Copy link
Member

The _chan_buf_send function which is part of the worker-control still uses its own loop to send the data:

for (;;) {
n = comms_unix_send(chan->fd, &byte, sizeof(byte), data_spec->ext.socket.fd_pass);
if (n < 0) {
if (n == -EAGAIN || n == -EINTR)
continue;
log_error_errno(ID(chan->owner), n, "Failed to send ancillary data on channel %s", chan->spec->id);
r = n;
goto out;
}
break;
}

We should get rid of this loop and make this a part of the resource event loop like it is in_chan_buf_recv. For this, we also need sid_resource_create_io_event_source to accept a new arg - a bit mask of events to watch for as currently it implicitly uses EPOLLIN only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant