Vim-fork focused on extensibility and usability
Go to file
Justin M. Keyes 68bcb32ec4 tui.c: Do not wait for tui loop on teardown. (#4789)
Because terminfo_stop() already ran, there is not much reason to wait
for the loop to teardown.

Helped-by: Björn Linse <bjorn.linse@gmail.com>
Helped-by: oni-link <knil.ino@gmail.com>

Closes #4778
References #3541
---
Bug report:

> After pressing `ZZ` I can find two threads freezing, occupying 100% CPU:
    |-systemd-+
              |-nvim,11567 /home/lz/code/1.rs +set title
              |   `-{nvim},11574

> 11567 has two threads:
    (gdb) info threads
      Id   Target Id         Frame
    * 1    Thread 0x7f7622907780 (LWP 11567) "nvim" 0x00007f76222e66bd in pthread_join () from /usr/lib/libpthread.so.0
      2    Thread 0x7f761f5ff700 (LWP 11574) "nvim" 0x00007ffcec9e9c59 in clock_gettime ()

    (gdb) thread apply all  bt

    Thread 2 (Thread 0x7f761f5ff700 (LWP 11574)):
    #0  0x00007ffcec9e9c59 in clock_gettime ()
    #1  0x00007f76210b9356 in clock_gettime () from /usr/lib/libc.so.6
    #2  0x00007f7622513e3c in ?? () from /usr/lib/libuv.so.1
    #3  0x00007f7622505e94 in uv_run () from /usr/lib/libuv.so.1
    #4  0x00000000004822ed in loop_close (loop=loop@entry=0x7f761f5fe870) at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/event/loop.c:87
    #5  0x00000000005a7ec0 in tui_main (bridge=0x7f761f6ac000, ui=0x7f761f69ace0) at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/tui/tui.c:234
    #6  0x00000000005a9b47 in ui_thread_run (data=<optimized out>) at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/ui_bridge.c:87
    #7  0x00007f7622510d07 in ?? () from /usr/lib/libuv.so.1
    #8  0x00007f76222e5474 in start_thread () from /usr/lib/libpthread.so.0
    #9  0x00007f76210ac69d in clone () from /usr/lib/libc.so.6

    Thread 1 (Thread 0x7f7622907780 (LWP 11567)):
    #0  0x00007f76222e66bd in pthread_join () from /usr/lib/libpthread.so.0
    #1  0x00007f7622510dae in uv_thread_join () from /usr/lib/libuv.so.1
    #2  0x00000000005aac9e in ui_bridge_stop (b=0x7f761f6ac000) at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/ui_bridge.c:104
    #3  0x00000000005a90e4 in ui_builtin_stop () at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/ui.c:91
    #4  0x000000000052be09 in mch_exit (r=r@entry=1) at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/os_unix.c:143
    #5  0x00000000004db1cc in getout (exitval=exitval@entry=1) at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/main.c:623
    #6  0x00000000004fa43c in preserve_exit () at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/misc1.c:2652
    #7  0x000000000052b77a in deadly_signal (signum=1) at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/os/signal.c:120
    #8  0x000000000052b7cf in on_signal (handle=<optimized out>, signum=<optimized out>, data=<optimized out>) at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/os/signal.c:145
    #9  0x0000000000484178 in signal_event (argv=<optimized out>) at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/event/signal.c:44
    #10 0x0000000000483b7f in queue_process_events (queue=0x7f7620417360) at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/event/queue.c:142
    #11 0x0000000000482208 in loop_poll_events (loop=0x84dec0 <loop>, ms=ms@entry=4000) at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/event/loop.c:56
    #12 0x000000000052a364 in input_poll (ms=ms@entry=4000) at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/os/input.c:325
    #13 0x000000000052a3e2 in inbuf_poll (ms=4000) at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/os/input.c:347
    #14 0x000000000052a839 in os_inchar (buf=buf@entry=0x0, maxlen=maxlen@entry=0, ms=ms@entry=-1, tb_change_cnt=tb_change_cnt@entry=0) at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/os/input.c:107
    #15 0x0000000000592eeb in state_enter (s=s@entry=0x7ffcec9d3560) at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/state.c:46
    #16 0x0000000000508533 in normal_enter (cmdwin=cmdwin@entry=false, noexmode=noexmode@entry=false) at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/normal.c:464
    #17 0x00000000004dc17e in main (argc=<optimized out>, argv=<optimized out>) at /tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src/nvim/main.c:538
2016-09-24 15:32:01 +02:00
.ci eval: use gperf to generate the hash of builtin functions 2016-08-31 21:57:04 +02:00
cmake functionaltest: Create lua helper for os.tmpname() 2016-08-31 11:32:28 +01:00
config file: Add buffered reading and writing 2016-06-23 21:17:51 +03:00
contrib Improve YCM contrib: Fix db path 2016-01-17 20:50:10 -05:00
man man: fix description of XDG_DATA_HOME (#5120) 2016-07-27 08:52:35 -04:00
runtime doc/deprecated.txt (#5338) 2016-09-24 15:07:49 +02:00
scripts vim-patch: Group alternations in preprocess_patch 2016-09-22 07:16:50 -04:00
src tui.c: Do not wait for tui loop on teardown. (#4789) 2016-09-24 15:32:01 +02:00
test test: api_spec 2016-09-22 20:04:32 +02:00
third-party third-party: Bump luv to v1.9.1-0 2016-09-10 18:43:05 +01:00
unicode Update unicode files 2016-06-26 19:16:11 +03:00
.editorconfig add .editorconfig 2016-02-23 18:03:27 +09:00
.gitignore ignore .res files generated by the tests in testdir 2016-08-11 02:14:02 -04:00
.travis.yml ci: .travis.yml: Upgrade to macOS 10.11 / xcode7.3 (#5378) 2016-09-23 17:06:54 +02:00
appveyor.yml build: Refactor appveyor/Windows scripts (#5244) 2016-08-26 01:38:46 -04:00
BACKERS.md Update backer URL 2015-11-11 19:50:33 -08:00
CMakeLists.txt Disable use of jemalloc in OpenBSD 2016-09-10 18:43:04 +01:00
CONTRIBUTING.md doc: CONTRIBUTING.md (#5239) 2016-08-23 23:49:09 -04:00
ISSUE_TEMPLATE.md doc: precision, concision, elision 2016-06-03 17:11:10 -04:00
LICENSE LICENSE: add LuaJIT notice. #899 2014-06-30 13:59:56 -04:00
Makefile Travis: Fix accidental building of 3rd-party dependencies. 2016-07-30 10:21:04 +02:00
README.md doc 2016-08-10 00:47:17 -04:00

Neovim

Website | Community | Wiki | Documentation | Mailing List | Twitter | Bountysource

Travis Build Status AppVeyor Build status Pull requests waiting for review Coverage Status Coverity Scan Build Clang Scan Build Gitter chat

Neovim is a project that seeks to aggressively refactor Vim in order to:

  • Simplify maintenance and encourage contributions
  • Split the work between multiple developers
  • Enable the implementation of new/modern UIs without modifications to the core
  • Improve extensibility with a new plugin architecture

For more details, see the wiki!

Throughput Graph

What's been done so far

See :help nvim-features for a comprehensive list.

What's being worked on now

See the Roadmap.

How do I get it?

There is a formula for OSX/homebrew, a PKGBUILD for Arch Linux, RPM, deb, and more. See the wiki!

License

Neovim is licensed under the terms of the Apache 2.0 license, except for parts that were contributed under the Vim license.

  • Contributions committed before b17d96 remain under the Vim license.

  • Contributions committed after b17d96 are licensed under Apache 2.0 unless those contributions were copied from Vim (identified in the commit logs by the vim-patch token).

See LICENSE for details.

Vim is Charityware.  You can use and copy it as much as you like, but you are
encouraged to make a donation for needy children in Uganda.  Please see the
kcc section of the vim docs or visit the ICCF web site, available at these URLs:

        http://iccf-holland.org/
        http://www.vim.org/iccf/
        http://www.iccf.nl/

You can also sponsor the development of Vim.  Vim sponsors can vote for
features.  The money goes to Uganda anyway.