Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Use only a single thread #85

Merged
merged 1 commit into from
Apr 13, 2017
Merged

Use only a single thread #85

merged 1 commit into from
Apr 13, 2017

Conversation

hjr3
Copy link
Owner

@hjr3 hjr3 commented Mar 25, 2017

This is testing much faster than using multiple threads (due to the lack of mutex lock contention for the pool). I was also able to remove rustful from the management API scope so we only have one version of hyper.

I have a few open items to fix:

  • fix health checks
  • finish storing stats
  • fix/remove test-server.rs

@yanns
Copy link
Collaborator

yanns commented Mar 25, 2017

Can we also remove the dependencies.rustful dependency in cargo.toml?

@hjr3
Copy link
Owner Author

hjr3 commented Mar 25, 2017

@yanns the test-server.rs code uses rustful. i added a note to fix or remove that so we can remove the rustful dependency.

@yanns
Copy link
Collaborator

yanns commented Mar 25, 2017

@hjr3 OK thx for the explanation. Then we can at least move the dependency to dev-dependencies. rustful?

pub struct Pool {
inner: Arc<RwLock<inner::Pool>>,
inner: Rc<RefCell<InnerPool>>,
Copy link
Collaborator

Choose a reason for hiding this comment

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

🥇

@hjr3
Copy link
Owner Author

hjr3 commented Mar 25, 2017

@yanns yes, I will either move the rustful dep to dev-deps or remove the need for the dep prior to merge.

@hjr3
Copy link
Owner Author

hjr3 commented Mar 28, 2017

one step closer!

The proxy, management and health check streams are merged together so
they can all run on the same thread. This removes the overhead of having
multiple tokio Cores running at the same time and gets rid of dedicated
threads for tasks that were not often used. Most importantly, it
simplifies the Pool implementation to not require synchronization for
reading servers out.

I have also removed the dependency on rustful. Using rustful was
requiring two different versions of hyper, which was causing some odd
conflicts with dependencies.
@hjr3 hjr3 merged commit 3e51641 into master Apr 13, 2017
@hjr3 hjr3 deleted the single-thread branch April 13, 2017 01:32
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