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

Implement nonblocking IO in IPC server #1313

Merged
merged 1 commit into from
Aug 8, 2017

Conversation

ilyaluk-old
Copy link
Contributor

Added client write buffer and handler for writable status on client
socket.

Also fixes #892.

Added client write buffer and handler for writable status on client
socket.
if (client->write_buffer_len == 0 && client->writable_event_source) {
wlc_event_source_remove(client->writable_event_source);
client->writable_event_source = NULL;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like it would cause issues if you didn't managed to clear out the write buffer all in one go, or for long lasting clients. No?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If client managed to fill its socket buffer, it might happen again. But we can shrink buffer in this case.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha, I was actually misreading some of this code.

@ddevault
Copy link
Contributor

ddevault commented Aug 8, 2017

LGTM, will test it later today.

@ddevault ddevault merged commit 8208e25 into swaywm:master Aug 8, 2017
@ddevault
Copy link
Contributor

ddevault commented Aug 8, 2017

Thanks!

@ilyaluk-old ilyaluk-old deleted the nonblock-ipc-server branch August 9, 2017 13:35
@ddevault ddevault mentioned this pull request Oct 7, 2017
6 tasks
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.

Freeze when scrolling fast between workspaces
3 participants