V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
TomeWong
V2EX  ›  Electron

electron 中使用 web worker 处理批量文件上传,如何在主进程暂停 web worker 中某个文件或者全部文件的上传

  •  1
     
  •   TomeWong · May 12, 2020 · 2711 views
    This topic created in 2177 days ago, the information mentioned may be changed or developed.

    目前是在 worker 主进程中读取准备上传的文件信息,通过 postMessage 传递给 web worker 子进程,接着在 web

    worker 子进程中来进行上传,如果上传信息有变化,在 web worker 中,通过 postMessage 传递给主进程

    该如何取消 web worker 子进程中批量上传的请求,或某一个请求呢。

    Supplement 1  ·  May 12, 2020
    我这边想到的是在主进程监听用户的操作,如果发生了变化,,通过 postMessage 传递给 web worker 中,然后在 web worker 中来处理
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5630 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 07:09 · PVG 15:09 · LAX 00:09 · JFK 03:09
    ♥ Do have faith in what you're doing.