davidgranstrom / scnvim

Neovim frontend for SuperCollider.
GNU General Public License v3.0
197 stars 27 forks source link

Handle infinite loops that generate output #7

Open davidgranstrom opened 5 years ago

davidgranstrom commented 5 years ago

An infinite loop (in SuperCollider) that also generate output to the post window hangs both sclang and nvim since there is too many calls that write to the post window buffer. Infinite loops with no output is fine (doesn't hang nvim) since the sclang process is spawned as an asynchronous job.

One way of handling this is to implement some kind of throttling mechanism which detect high density output from sclang and limits the output to the post window temporarily, possibly with some informative info message.

Until this is solved, it could be good to know that calling killall sclang on *nix systems in a another terminal and then pressing <C-c> in nvim will make it unfreeze so that you can save your work and restart SuperCollider.

davidgranstrom commented 4 years ago

Depends on #88