Giter Club home page Giter Club logo

Comments (5)

ArEnSc avatar ArEnSc commented on June 1, 2024 1

@leon-thomm thank you for your answers! it means a lot I have gotten this to work for something I am working on just trying to figure out more of the details

from ryven.

leon-thomm avatar leon-thomm commented on June 1, 2024

The whole application is single threaded. Such functionality must be implemented on node level, you just have to write it yourself. I think nothing stops your nodes from exploiting concurrency, even starting threads and processes and have the node update itself on completion or messages - it rather comes down to the use case and what design is intuitive.

from ryven.

leon-thomm avatar leon-thomm commented on June 1, 2024

I experimented with multi-threading in Ryven itself a while ago, especially for separating execution of the GUI thread and the flow execution, but I decided it's generally not worth the struggle. It is either extremely unsafe or requires a lot of abstraction, which comes at a cost in Python.

from ryven.

ArEnSc avatar ArEnSc commented on June 1, 2024

@leon-thomm so that threading bridge code is pretty much dead code? I was trying to figure out where it was being triggered, Also could you let me know where the entry point of an exec execution would happen? When you say it's single threaded you mean the UI thread is blocked when there is a long computation ?

from ryven.

leon-thomm avatar leon-thomm commented on June 1, 2024

so that threading bridge code is pretty much dead code?

not dead code but not implementing threading right now

I was trying to figure out where it was being triggered

In a few places, it's a ryvencore-qt thing - primarily in FlowCommands.py (see FlowUndoCommand).

Also could you let me know where the entry point of an exec execution would happen?

That's happening in ryvencore. The current version of Ryven runs on ryvencore v0.3. An update doesn't happen without a reason, either direct interaction from the user (using the node), or something else that the user or node developer set up. In early versions, update messages were always passed from node output to node input directly (quite literally, the node output object calling the connection object, which then calls the node input object, which then triggers its node's update method). This was gradually replaced by a central FlowExecutor class, see here and here. This was standardized in the WIP ryvencore v0.4 which will power the next Ryven release, so everything will go through the FlowExecutor.

When you say it's single threaded you mean the UI thread is blocked when there is a long computation ?

yes, i.e. threading and concurrency should be built into the nodes themselves if it is needed.

from ryven.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.