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

Make network processes synchronous #9

Closed
wants to merge 2 commits into from
Closed

Conversation

wynro
Copy link
Contributor

@wynro wynro commented Aug 13, 2017

Given some changes in the Emacs networking code, this change makes the network process synchronous. It is also necessary for the server to work properly.

Extract from the changelog

The networking code has been reworked so that it's more
asynchronous than it was (when specifying :nowait t in 'make-network-process').
How asynchronous it is varies based on the capabilities of the system, 
but on a typical GNU/Linux system the DNS
resolution, the connection, and (for TLS streams) the TLS negotiation
are all done without blocking the main Emacs thread.  To get
asynchronous TLS, the TLS boot parameters have to be passed in 
(see the manual for details).

wynro added 2 commits August 13, 2017 12:00
- Add list of Content Types given file extension
- Add function to return Content Type of a path
@dakra
Copy link

dakra commented Sep 11, 2018

Friendly bump :)

@juergenhoetzel
Copy link

Also friedly bump 🐛
ancane/markdown-preview-mode#33

@eschulte
Copy link
Owner

Thanks for the merge request. I have a couple of questions.

  1. Could the value in ws-content-types have been pulled from somewhere else in Emacs (e.g., from somewhere in the gnus or message code)? I'd rather not create a second copy of a list that I expect is already better maintained elsewhere.

  2. What are the effects of removing the :nowait t flag from the call to make-network-process?

@eschulte
Copy link
Owner

Maybe instead of removing :nowait t it would be better to make this flag conditional on the Emacs version.

@dakra
Copy link

dakra commented Jan 17, 2019

ping @wynro

@eschulte
Copy link
Owner

I've merged half of this pull request (1 of 2 commits). I'm still not comfortable committing the mime types as I'd rather just require that information from wherever else it must be defined in Emacs. I don't want to have to maintain a new list of mime types.

@wynro
Copy link
Contributor Author

wynro commented Mar 10, 2019

@eschulte Fully agree. I wanted to separate this and pull-request only the second commit but I forgot, sorry.

In any case, now that the relevant piece is merged I'll close the pull request

@wynro wynro closed this Mar 10, 2019
@dakra
Copy link

dakra commented Mar 10, 2019

@eschulte thanks 🎉

jcaw added a commit to jcaw/elnode that referenced this pull request Jun 1, 2019
Elnode doesn't work on Emacs 26.1, because it disallows both the `:nowait` and
`:server` parameters. Add a cautious fix for this, which flips `:nowait` to nil
when Emacs is on 26.1 upwards.

This is the same method used by `emacs-http-server` to fix the same bug.

Initial fix:

  eschulte/emacs-web-server#9

26.1-only patch:

  eschulte/emacs-web-server@cafa5b7
jcaw added a commit to jcaw/elnode that referenced this pull request Jun 1, 2019
Elnode doesn't work on Emacs 26.1, because it disallows both the `:nowait` and
`:server` parameters. Add a cautious fix for this, which flips `:nowait` to nil
when Emacs is on 26.1 upwards.

This is the same method used by `emacs-http-server` to fix the same bug.

Initial fix:

  eschulte/emacs-web-server#9

26.1-only patch:

  eschulte/emacs-web-server@cafa5b7
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.

4 participants