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 asynchronous and possibility to stop the HTTP request #10

Open
JulioJu opened this issue May 9, 2019 · 3 comments
Open

Make asynchronous and possibility to stop the HTTP request #10

JulioJu opened this issue May 9, 2019 · 3 comments

Comments

@JulioJu
Copy link

JulioJu commented May 9, 2019

HI !

It could be cool to make this plugin asynchronous? Actually, if the remote server take long time to deliver a response, Vim is totally blocked.

To test it, simply on your Server, create a REST endpoint and add delay before send the HTTP response.

Neovim and Vim since version 8.0 support asynchronous plugins.

If the plugin become asynchronous, maybe it could be easy killed thanks a command? As it if we want interrupt the HTTP Request, we could.

Thanks in advance ;-)

@sharat87
Copy link
Owner

Running requests shouldn't be freezing ViM with the current version. Although I think it still freezes Neovim, but I haven't invested much time there just yet. Let me know how it goes with ViM.

@JulioJu
Copy link
Author

JulioJu commented Sep 17, 2019

Yes, does not freeze Vim in the current version, so cool :-).

For the other question, maybe it could be hard to manage HTTP request sent (cancel a request sent). It's very easy with https://github.com/diepm/vim-rest-console , by simply kill the corresponding childd curl process. But roast.vim doesn't seems to launch an independent child process.

$ ps -u julioprayer --forest
    PID TTY          TIME CMD
[…]
  11082 pts/4    00:00:00          \_ zsh
  11313 pts/4    00:00:00              \_ vim
[…]

As you say it still freezes Neovim, but with Neovim there are also others problems (see #8 ).

@JulioJu
Copy link
Author

JulioJu commented Sep 17, 2019

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

No branches or pull requests

2 participants