With the following file:
```
py <<EOF
from threading import Thread, Event
from time import time, sleep
shutdown_event = Event()
def test():
while not shutdown_event.is_set():
print time()
shutdown_event.wait(1)
th = Thread(target=test)
th.daemon=True
th.start()
EOF
autocmd VimLeave * python print th.is_alive() ; print "Up" ;
shutdown_event.set() ; sleep(5); th.join()
qa
```
sourced using `vim -u NONE -S test_thread_shutdown.vim` everything shuts down
fine. But when I change `vim` to `vim -g` it shows one of the following:
```
[xcb] Unknown request in queue while dequeuing
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been
called
[xcb] Aborting, sorry about that.
vim: /var/tmp/portage/x11-libs/libX11-1.5.0/work/libX11-1.5.0/src/xcb_io.c:178:
dequeue_pending_request: Assertion `!xcb_xlib_unknown_req_in_deq' failed.
Vim: Caught deadly signal ABRT
Vim: Finished.
```
```
{timestamp, printed once; or just True}
{GVim window hangs and does not even redraw after it is hidden}
```
```
vim: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.0.
```
```
The program 'vim' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadIDChoice (invalid resource ID chosen for this connection)'.
(Details: serial 1385 error_code 14 request_code 138 minor_code 4)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the --sync command line
option to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)
The program 'vim' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadIDChoice (invalid resource ID chosen for this connection)'.
(Details: serial 1387 error_code 14 request_code 138 minor_code 17)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the --sync command line
option to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)
```
. I even managed to get one ABRT with backtrace: http://bpaste.net/show/88404/
(though it happened with my patches).
Vim used: 7.3.875 (commit acf7368a2acc300b07430a7abb576288cd60397f), build with
the following script:
#!/bin/zsh
rm -f src/auto/config.cache
make distclean
make clean
CC='clang' \
CFLAGS=' -O0 -ggdb3 ' \
./configure --with-features=huge \
--enable-python3interp=dynamic
--with-python3-config-dir=/usr/lib64/python3.2/config-3.2 \
--enable-pythoninterp=dynamic \
--enable-pythoninterp=dynamic \
--enable-rubyinterp \
--enable-perlinterp \
--enable-luainterp=dynamic \
--enable-tclinterp \
--enable-termtruecolor \
--enable-sniff \
--enable-gui=yes \
--prefix=/usr
make -j5
--
--
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.