Git Product home page Git Product logo

Comments (4)

rconstantine avatar rconstantine commented on August 14, 2024 6

I'd like to know this too, please.

from vue-worker.

alejandroiglesias avatar alejandroiglesias commented on August 14, 2024 3

I would like to know simply how to call a worker from a VueX action. Can somebody provide some guidance?

from vue-worker.

denilsonsa avatar denilsonsa commented on August 14, 2024

Is it possible to access the vuex store from within a function passed onto a worker ?

This is likely not possible (or not feasible), because Web Workers don't share any data with the main thread. By design, communication between workers is done by passing messages, and such data is copied but never "shared".

While technically it could be possible to set up a bunch of messages so that a worker could ask for data from the main thread, this is likely going to increase the overhead and the complexity of the code, and making it much slower to run and harder to maintain.

from vue-worker.

siloam avatar siloam commented on August 14, 2024

Not true. Currently indexedb is blocking - and if you want to sync the store with your indexedb instance without freezing the DOM - using workers is the only way to make it truly non blocking. And yes, it is possible. The app will be faster. However I do not know if the module allows it, I have used worker-loader module before.

from vue-worker.

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.