Marc Weber wrote:
> > Please explain what this would do what vim.command() isn't doing.
> > I mean the one explained below ":he python-vim".
>
> You can start multiple threads in python. The help didn't say tat
> vim.command() is thread safe. However it would be nice to replace this
> executeVimCommand hackery with a more native, non blocking thread safe
> command. Then you could start writing nice interfaces for debuggers
> more easily.
I do think that vim.command() is thread safe. Not 100% sure, I didn't
look at the detailed documentation for Python native interface. The
code contains:
Py_BEGIN_ALLOW_THREADS
Python_Lock_Vim();
do_cmdline_cmd((char_u *)cmd);
update_screen(VALID);
Python_Release_Vim();
Py_END_ALLOW_THREADS
Looks like a lock is used to guarantee only one command is done at a
time. And that's required, since the Vim core is defenitely not
thread-safe.
--
5 out of 4 people have trouble with fractions.
/// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---