On Tuesday, September 3, 2013 1:17:59 PM UTC-5, Bjorn Tipling wrote:
> I am pretty excited about this patch and hope it makes it in.
> 
> 
> Ben, why should asynchronous receive any type of restriction not already 
> placed on code that runs some milliseconds after a key press (an existing 
> hook). 

And most of these can be interrupted with CTRL-C. I am not certain whether the 
async functions will be since you added their processing to the functions which 
get keypresses (I think...I'm not actually familiar with most of Vim's code). 
I'm not saying they're not...only that the need to be. We've already had a few 
"Vim hangs on this regex" bugs in 7.4, and I could easily see a plugin that 
uses a search() call inside one of these timer functions. Or maybe it calls an 
external tool that is deadlocked for some reason. Or any number of other things 
could go wrong that the user doesn't want to wait for.

And I'm more worried about function that takes seconds, or minutes, to 
complete, than I am about milliseconds. My point was that users of these 
functions need to be aware that the action is not actually asynchronous in the 
sense of running in the background and allowing user input to continue in the 
foreground; you just mean it can be synced to a timer rather than a specific 
user input, correct?

> Cancelling asynchronous requests can lead to unpredictable behavior is 
> probably never desirable. I've already experienced plugins that block for too 
> long and what I do is, I just remove the plugin.
> 

If you're typing something, suddenly Vim stops responding to any keyboard 
input, you've waited most of a minute for Vim to start responding, and you have 
unsaved work you wish to keep...it can be more desirable to interrupt the 
action and then continue using Vim long enough to save your work and restart.

Maybe if the user interrupts the action with CTRL-C you need to set a flag to 
remove the timer from the list, to prevent it firing off again in a few 
milliseconds?

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Raspunde prin e-mail lui