worker cleanup
This commit is contained in:
parent
8238e36ca1
commit
cc343350c0
2 changed files with 5 additions and 0 deletions
|
|
@ -152,6 +152,10 @@ oop.inherits(Mode, TextMode);
|
||||||
session.setAnnotations(errors)
|
session.setAnnotations(errors)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
worker.on("terminate", function() {
|
||||||
|
session.clearAnnotations();
|
||||||
|
});
|
||||||
|
|
||||||
return worker;
|
return worker;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -65,6 +65,7 @@ var WorkerClient = function(baseUrl, topLevelNamespaces, module, classname) {
|
||||||
oop.implement(this, EventEmitter);
|
oop.implement(this, EventEmitter);
|
||||||
|
|
||||||
this.terminate = function() {
|
this.terminate = function() {
|
||||||
|
this._dispatchEvent("terminate", {});
|
||||||
this.$worker.terminate();
|
this.$worker.terminate();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue