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

[feature] signal on a semaphore when the proxy-server is initialized #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

ghost
Copy link

@ghost ghost commented Jan 7, 2016

This change is blocked by GaloisInc/http-server#9

If one wants to run the proxy within a larger program in its own thread, it is advantageous to know when the proxy has finished initializing.

  • I have renamed proxyMain to proxyMain_ and changed it to accept an additional MVar () argument. It signals (non blocking) on that semaphore just before waiting on the socket for connections (pending [feature] signal on a semaphore when the server is initialized GaloisInc/http-server#9).
  • I've added a new function proxyMain which does exactly what the old one did, but uses proxyMain_.
  • I've added a stack.yaml file for users of stack and included its work dir to the .gitignore file.

Changes to the API dictate a minor-version bump (adding a new function).

@achudnov
Copy link
Owner

achudnov commented Jan 7, 2016

Thank you. The pull request looks good. However, before I merge it: have you had any feedback from Galois regarding GaloisInc/http-server/#9 ?

Also, for stack, please, consider testing against the latest LTS-4.0. I don't expect any problems as I've recently built the current tip of master on it, but would be good to know anyway.

@ghost
Copy link
Author

ghost commented Jan 7, 2016

I don't recommend merging ahead of Galois because that will break haxy.

There's been no response from Galois on the PR, which is now 1 month old. http-server doesn't seem to be actively developed if you look at the contributors page.

I've built against lts-4.0 and tested. 👍

@achudnov
Copy link
Owner

achudnov commented Jan 8, 2016

Yeah, that was my thought as well. http-server isn't developed, but it's still maintained. I'll see if I can get that PR moving.

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.

2 participants