+
+ _run (fn, value) {
+ try {
+ const res = fn(value.data)
+ this.parent.postMessage({ data: res, _id: value._id })
+ this.lastTask = Date.now()
+ } catch (e) {
+ this.parent.postMessage({ error: e, _id: value._id })
+ this.lastTask = Date.now()
+ }
+ }