Skip to content

Clean fix lwt io flow#329

Merged
dinosaure merged 6 commits into
mirage:masterfrom
dinosaure:clean-fix-lwt-io-flow
Oct 14, 2020
Merged

Clean fix lwt io flow#329
dinosaure merged 6 commits into
mirage:masterfrom
dinosaure:clean-fix-lwt-io-flow

Conversation

@dinosaure
Copy link
Copy Markdown
Member

So, I don't really know why we decided to use Lwt_io but it seems a bad choice which was may be lead by the ability to create such value with Lwt_ssl.out_channel_of_descr/Lwt_ssl.in_channel_of_descr on the other side. This is not the first issue about Lwt_io (double-close for example) but cohttp trust on that and we must tweak implementation of protocols to be able to re-schedule fibers when the socket is not readable.

I hope that this is the last fix to fit into Lwt_io but we definitely should think to remove the usage of it - specially when a protocol such as HTTP/1.1 requires a full control of when we want to read and when we want to write (eg. http/af).

This PR is mostly a clean-up about the mix between Lwt_io/Conduit_lwt.TCP/Conduit_lwt_tls.TCP which keeps tests right and should fix issues on cohttp then. This error is more, from my point-of-view, about a technical debt which is outside the scope of mirage when we chosen to use Lwt_io.

I added a comment which tells to the user to not use Conduit_lwt.io_of_flow too.

@dinosaure dinosaure mentioned this pull request Oct 13, 2020
3 tasks
@dinosaure dinosaure force-pushed the clean-fix-lwt-io-flow branch from 1ea344f to 82692fc Compare October 13, 2020 17:53
@dinosaure dinosaure merged commit 4b9e8b0 into mirage:master Oct 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant