You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
9 lines
257 B
9 lines
257 B
// worker的优化计算,暂时没用到;
|
|
const math = require('../utils/math')
|
|
|
|
worker.onMessage(function (res) {
|
|
console.log('这是worker内部线程打印的')
|
|
console.log(res)
|
|
let sum = math.plus(res.x, res.y)
|
|
worker.postMessage({ sum })
|
|
})
|