AsyncStop does not work when I use it to kill a endless loop
Opened this issue · 2 comments
jinastro commented
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 commented
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 commented
Thanks so much for your response,I got the point.