Git Product home page Git Product logo

Comments (6)

mathstuf avatar mathstuf commented on May 14, 2024

The problem is that any of the calls from gui.c will have to go through the commands API since it cannot call into the (future) uzbl thread from the gui thread. Same with variables.c depending on which thread the code in variables.c is meant to run in (I prefer the uzbl thread (which could call the functions directly), but maybe the gui thread is better?).

from uzbl.

keis avatar keis commented on May 14, 2024

The exact separation of the threads is not clear to me and maybe it something we would have to untangle when we get to that. But even then I think going through the commands API would be a bad idea as there's other mechanism for safely passing those "messages" across threads like gio g_task_run_in_thread.

And the big one in gui.c is js on page which I guess would be gui thread call in the end anyway?

from uzbl.

keis avatar keis commented on May 14, 2024

sry. g_task_run_in_thread was not the one I was thinking of. By I think I remember reading you could attach them to specific main loops

from uzbl.

mathstuf avatar mathstuf commented on May 14, 2024

js page in WebKit2 is a write to the extension's socket/pipe and a wait for the response. We can't block the GUI thread on that.

from uzbl.

keis avatar keis commented on May 14, 2024

hmm, ok. so page like it's implemented now doesn't actually work then? I forget what is just placeholders :)

To get the extension working as big task on it's own but I think you're right saying we should not be trying to block when communicating with it (Not even sure we could). In the gui we could get away with fire and forget for what we're doing now but in the commands we need a way of waiting for the response. Having a nice wrapper api for running javascript would help then to avoid bloating commands.c even more.

from uzbl.

keis avatar keis commented on May 14, 2024

Re variables it's very tempting to run it with the gui because of all the gobject properties we are setting. But I think conceptually it belongs in the uzbl thread so I think that's the correct choice even if it's a bit more work.

from uzbl.

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.