Skip to content
This repository was archived by the owner on Jun 21, 2020. It is now read-only.

Conversation

tirr-c
Copy link
Collaborator

@tirr-c tirr-c commented Apr 21, 2019

Description

  • Renamed the original serve to run.
  • Added the new serve which returns a Future that can be awaited on.

Motivation and Context

Using the new serve, server Future can be run concurrently with other Futures easily.

How Has This Been Tested?

I've briefly tested serve with Tide and Runtime Tokio and it worked.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@yoshuawuyts
Copy link
Member

@tirr-c I'm thinking, perhaps if we rename serve to run, and serve_async to serve, it might create a bit clearer distinction between the purpose of each method -- similar to Hyper's naming scheme.

@tirr-c tirr-c changed the title http-service-hyper: Add serve_async that returns a Future http-service-hyper: Make serve return a Future Apr 21, 2019
@tirr-c
Copy link
Collaborator Author

tirr-c commented Apr 21, 2019

@yoshuawuyts Changed function names, and this is a breaking change. I've updated the PR description accordingly.

Copy link
Member

@yoshuawuyts yoshuawuyts left a comment

Choose a reason for hiding this comment

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

Looks great!

@yoshuawuyts yoshuawuyts merged commit 90efbfb into http-rs:master Apr 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants