wx.createWorker这个方法只能在app.js中使用吗?
-在其他页面的js中使用createWorker方法报错:
VM8742:1 appServiceSDKScriptError
createWorker: exceed max concurrent workers limit.; at wx.createWorker
Error: createWorker: exceed max concurrent workers limit.
- 难道其他页面不可以多线程?
- 复现路径
// pages/orders/orders.js
const app=getApp();
Page({
testthrad:function(){
var worker = wx.createWorker(’…/…/workers/request/index.js’)
},
- 提供一个最简复现 Demo
// pages/orders/orders.js
const app=getApp();
Page({
testthrad:function(){
var worker = wx.createWorker(’…/…/workers/request/index.js’)
},