-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use the new Async Server to replace analysis threads #3055
Comments
I'm concerned about having an unbounded number of processes running, more opportunities for zombie processes. What if we only created one other process for all async tasks, saved that That other process would have a pool of @goanpeca, @ccordoba12, @Nodd, thoughts? |
I'm +1 for that. Please go ahead with one server only :-) |
Sound good stevo |
I think we need two servers: one that is running in a target environment, and one that is running in the current environment. The current environment would be used for things that don't rely on the target environment, removing the need for complicated path overrides in the target environment. |
Also, if possible, we should avoid using Qt in the target environment, since that is a huge can of worms. |
|
We shouldn't require it to be installed in the target project environment, and I'm not sure if we can "patch" it in, especially across python versions. |
Ahh ok. I never thought we needed to do that... the idea is to have a root env for spyder and spyder plugins and a spyder infrastructure to be able to call python modules that are specific to python versions (pep, jedi, rope, ipython backend etc...). There is no Qt python stuff that we would need to have in place in the specific environment. |
These are actually two new types of plugins: |
So, when we start the |
We write the two |
|
👍 |
My thoughts:
|
@ccordoba12 By deprecating our Python console, you mean keeping ipython only ? If that's the case I'm strongly against it, I run my scripts in a new python interpreter almost exclusively. |
@Nodd, I mean that I'm planning to move our Python console to be a third-party plugin, so others can help me to maintain it (if they want to keep using it) because having two consoles is too much of a burden :-) |
I don't see myself having time to implement this for 3.0beta4. |
Here is the API sketch I made: class AsyncService:
"""The base async service that runs in the current env"""
def __init__(self, executable=None, env=None):
# set up the zmq socket
pass
def setup(self):
"""Set up the QProcess - this is intended to be overridden"""
# discover base plugins, pass to the qprocess
def start(self):
"""Start the QProcess"""
# Set up the socket notifier and heartbeat
def request(self, plugin, func_name, *args, **kwargs):
"""Send a request to the provider, returning the request id"""
class AsyncEnvService(AsyncService):
def setup(self):
pass
# discover env plugins, add to PYTHONPATH, set up qprocess
class AsyncManager:
def __init__(self):
# gets the port and the list of plugins to load from argv
pass
class AsyncPlugin:
pass
class AsyncEnvPlugin:
"""A plugin that should run in a target environment."""
libs = [] # Libs to load in the target environment |
Thanks @blink1073! |
This is superseded by issue #4742. |
Builds on #3033 and #3049.
The text was updated successfully, but these errors were encountered: