Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • V vlc.js
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 42
    • Issues 42
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 6
    • Merge requests 6
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Model experiments
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Jean-Baptiste Kempf
  • vlc.js
  • Issues
  • #29

access: do not clone File object with postMessage()

Calling postMessage() on a object without specifying the transfer parameter is sending it using structured cloning. Adding File to transferList does not seem to be a good solution because then the file will only be available in the receiving end of postMessage(), if we can postMessage to only one pthread worker (with named threads for example), and making it available to multiple workers is not possible.

from the documentation :

The ownership of these objects is given to the destination side and they are no longer usable on the sending side.

In addition to that the current patch does a postMessage on all pthread workers, which I think is bad because it will make all the pthread workers heavier.

It would be better to use sharedArrayBuffer instead and asynchronously read into shared memory. (can't synchronously read in the main thread)

Problem: how do we make sure we can do synchronous reads in a pthread?

WIP: https://github.com/emscripten-core/emscripten/issues/14094

Assignee
Assign to
Time tracking

VideoLAN code repository instance