Comments (5)
Right, I definitely plan to move to an asynchronous system once I've
got a good grasp on the basics. I don't know when that'll be, but
it'll be a necessity for larger projects.
Austin
On Mon, Jul 23, 2012 at 7:42 PM, Takafumi Arakaki
[email protected]
wrote:
Isn't it better to use
xml-rpc-method-call-async
instead ofxml-rpc-method-call
? Asynchronous programming is bit hard but otherwise you can't use the advantage of having multiple processes. I prefer not waiting during traad does the job in background.
Reply to this email directly or view it on GitHub:
#6
from traad.
Cool! I can't wait to see that. I'm closing this as it's on your plan.
from traad.
I've added some support for async calls. The refactorings should all run asynchronously now, so let me know what you think.
One issue related to this which I haven't resolved yet is how to properly revert buffers associated with refactorings. Prior to this change, the buffer from which a refactoring was run would be automatically reverted when the refactoring finished. I'm not sure what the best way to do that is with the async call handler...any thoughts or advice?
from traad.
Awesome! I haven't tried yet, but by quick glance, I think changing traad-call-async
to something like
(defun traad-call-async (callback func &rest args)
(apply
#'xml-rpc-method-call-async
(lexical-let ((callback callback))
(lambda (result) (traad-async-handler result callback)))
(concat
"http://" traad-host ":"
(number-to-string traad-port))
func args))
should solve the problem. You can revert buffer in the callback. Probably you would want to add another argument for callback so that you can call it like this (traad-call-async func funargs callback cbargs)
, otherwise, user of traad-call-async must use lexical-let
again.
from traad.
Great, thanks. I've implemented part of what you suggested, and I'll look at the rest (the cbargs bit) when I get a chance.
from traad.
Related Issues (20)
- rename-resource doesn't seem to work HOT 1
- Connecting to traad server seems broken in emacs HOT 4
- Split emacs client code out HOT 1
- "Error (error) while connecting" and "task-id is nil" HOT 1
- stop_app is not defined in server.py HOT 3
- Multiple projects - multiple traad servers? HOT 4
- Company-mode plugin HOT 1
- RuntimeError: Request context not initialized [python 3] HOT 7
- Support rope.refactor.change_signature ArgumentAdd to add an argument
- Consider using an asyncio-based http server HOT 1
- Consider using pytest for the tests HOT 2
- Support for inlining of variables HOT 7
- AttributeError: 'Call' object has no attribute 'starargs' HOT 4
- Iterator / context manager extraction HOT 1
- Refresh/revalidate server when necessary HOT 1
- Implement auto-termination HOT 1
- Three undefined names HOT 1
- Depends on bind-map HOT 1
- traad does not work with conda environments
- Can not install server and need to make it with pyenv
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from traad.