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

AsyncStop does not work when I use it to kill a endless loop #270

Open
jinastro opened this issue Jan 8, 2023 · 2 comments
Open

AsyncStop does not work when I use it to kill a endless loop #270

jinastro opened this issue Jan 8, 2023 · 2 comments

Comments

@jinastro
Copy link

jinastro commented Jan 8, 2023

I use the command below in vim to compile the C++ file and run it:

AsyncRun time ( cmake -DCMAKE_BUILD_TYPE=Release -B build && cmake --build build --parallel 8 ) && echo -e "------------------------------------------\n" && time ( ./bin/main $@ ) && echo -e "\n------------------------------------------"

A C++ file like this

#include<iostream>

int main(){
  while (1) {
    std::cout << "hello world" << std::endl;
  }
}

Then, the running results of the code above were shown in the Quickfix window.
Finally, I use AsyncStop, looking forward to killing the endless loop. However, it doesn't work and I have to kill vim.

So, what's the problem? I really appreciate any help you can provide.

@skywind3000
Copy link
Owner

skywind3000 commented Jan 8, 2023

vim is too busy to handle the output, don't have enough cpu time to proceed other command.
don't print so much.

Or you can write another tool to run your program, this tool will work as a text filter which will limit the output rate.

@jinastro
Copy link
Author

Thanks so much for your response,I got the point.

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