Skip to content

Cooperative Lwt_unix.bind (sockets) - #296

Merged
aantron merged 2 commits into
masterfrom
cooperative-bind
Dec 2, 2016
Merged

aantron merged 2 commits into
masterfrom
cooperative-bind

Conversation

@aantron

@aantron aantron commented Nov 28, 2016 •

Copy link
Copy Markdown
Collaborator

Resolves #230.

Making Lwt_unix.bind cooperative is a breaking change, so:

  1. The existing bind is deprecated, starting in the next release, with this message:
Warning 3: deprecated: Lwt_unix.bind
This function will soon return threads (-> unit Lwt.t), because the bind system
call can block on Unix filesystem sockets. See
  https://github.com/ocsigen/lwt/issues/230
To keep using the current signature, use Lwt_unix.Versioned.bind_1
To use the new non-blocking version immediately, use Lwt_unix.Versioned.bind_2
  1. Lwt_unix.Versioned.bind_2, added by this PR, will replace Lwt_unix.bind in Lwt 3.0.0.

cc @dsheets

@aantron aantron added this to the 2.7.0 milestone Nov 28, 2016
@aantron

aantron commented Nov 28, 2016

Copy link
Copy Markdown
Collaborator Author

I think this change has to affect the new establish_server as well. It should have result type server Lwt.t.

The new function is called Lwt_unix.Versioned.bind_2. It will replace
the current Lwt_unix.bind in a major release.
@aantron
aantron merged commit 2527f03 into master Dec 2, 2016
@aantron
aantron deleted the cooperative-bind branch December 3, 2016 12:33
aantron added a commit that referenced this pull request Dec 23, 2016
Should have been done in 155905c.

Related #296.
aantron added a commit that referenced this pull request Dec 23, 2016
Should have been done in 155905c.

Related #296.
aantron added a commit that referenced this pull request Dec 25, 2016
Should have been done in 155905c.

Related #296.
aantron added a commit that referenced this pull request Apr 8, 2017
Originally requested in #230 and prepared in #296.
aantron added a commit that referenced this pull request Apr 9, 2017
Originally requested in #230 and prepared in #296.
aantron added a commit that referenced this pull request Apr 10, 2017
Originally requested in #230 and prepared in #296.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant