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

Cooperative Lwt_unix.bind (sockets) #296

Merged
merged 2 commits into from
Dec 2, 2016
Merged

Cooperative Lwt_unix.bind (sockets) #296

merged 2 commits into from
Dec 2, 2016

Conversation

aantron
Copy link
Collaborator

@aantron aantron commented Nov 28, 2016

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
Copy link
Collaborator Author

aantron commented Nov 28, 2016

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