Wednesday, October 8, 2014

Regarding vim python interface and thread blocking issue.

Hi, all.
I write a simple function to help post code to bpaste.net. However, the function is suffering blocking issue.

To illustrate my problem, here is my code. https://bpaste.net/show/14a1d044c110
On line #33, the BpasteAsync().start() is invoked with :python command.

It works well regarding threading, as the control returns back to functions#Bpaste. However, it takes a long long time, almost up to 50 seconds for the background thread, which #15 belongs to finish. (blocked?)


My purpose is to post the selected code in background and echo the message in vim when completed.

Is the above pastecode the right way to do?
If so, how to avoid the long time consumption?

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: