当前位置:网站首页>Web worker poll request
Web worker poll request
2022-06-28 15:10:00 【Feng, Feng】
// this.timer.terminate(); close worker
timerWorker() {
console.log("timerWorker");
function createWorker(f) {
let blob = new Blob(["(" + f.toString() + ")()"]);
let url = window.URL.createObjectURL(blob);
let worker = new Worker(url);
return worker;
}
this.timer = createWorker(() => {
setInterval(() => {
self.postMessage("timer");
}, 1000);
});
this.timer.onmessage = () => {
// polling
};
this.timer.postMessage("init");
},
边栏推荐
- The boss told me three times: low key, low key, low key
- How to solve the following problems in the Seata database?
- 从莫高窟到太平洋,海量数据找到了新家园
- 华为能成“口红一哥”,或者“带货女王”吗?
- 完整的模型训练套路(一)
- 使用LamdbaUpdateWrapper的setSql作用及风险
- What is the renewal fee for PMP certificate?
- 动力电池,是这样被“瓜分”的
- The hidden crisis of Weilai: past, present and future
- Facebook出手!自适应梯度打败人工调参
猜你喜欢
DBMS in Oracle_ output. put_ Line output problem solving process

PMP真的有用吗?

What is the renewal fee for PMP certificate?

如何从零搭建10万级 QPS 大流量、高并发优惠券系统

WPF 视频硬解码渲染播放(无空域)(支持4K、8K、高帧率视频)

Facebook! Adaptive gradient defeats manual parameter adjustment

3. caller service call - dapr

Is PMP really useful?

完整的模型训练套路(一)

Q-Tester 3.2:适用于开发、生产和售后的诊断测试软件
随机推荐
Does Frankfurt currently support SQL?
halcon 基础总结(一)裁切图片并旋转图像
Leetcode (406) - rebuild the queue based on height
[spatial & single cellomics] phase 1: Study on PDAC tumor microenvironment by single cell binding spatial transcriptome
【mysql学习笔记24】索引设计原则
Performance comparison of deep learning models on cat and dog image data sets
MIPS汇编语言学习-01-两数求和以及环境配置、如何运行
R语言ggplot2可视化:patchwork包将一个ggplot2可视化结果和一个plot函数可视化结果横向组合起来形成最终结果图、两个可视化的组合结果对齐、并为组合图像的每个子图添加标题
C#/VB. Net to convert PDF to excel
Yiwen teaches you to quickly generate MySQL database diagram
Express template engine
C语言学习-20-归并排序
【空间&单细胞组学】第1期:单细胞结合空间转录组研究PDAC肿瘤微环境
Leetcode 48. Rotate image (yes, resolved)
Softing epGate PB系列网关-可将PROFIBUS总线集成到EtherNet/IP网络
WPF 视频硬解码渲染播放(无空域)(支持4K、8K、高帧率视频)
厨卫电器行业S2B2C系统网站解决方案:打造S2B2C平台全渠道商业系统
浪擎与浪潮,一个从OEM到价值共生的生态样板
BatchNorm2d原理、作用及其pytorch中BatchNorm2d函数的参数讲解
使用LamdbaUpdateWrapper的setSql作用及风险