avoid worker restart unless it's slicing
This commit is contained in:
parent
4471f728cc
commit
41d30cef0c
3 changed files with 8 additions and 2 deletions
|
|
@ -39,6 +39,12 @@ if (self.window) {
|
|||
}
|
||||
|
||||
KIRI.work = {
|
||||
isSlicing : function() {
|
||||
var current = 0;
|
||||
for (var key in slicing) { current++ }
|
||||
return current > 0;
|
||||
},
|
||||
|
||||
restart : function() {
|
||||
if (worker) worker.terminate();
|
||||
|
||||
|
|
|
|||
|
|
@ -2556,7 +2556,7 @@ self.kiri.license = exports.LICENSE;
|
|||
// hide all dialogs
|
||||
hideDialog();
|
||||
// cancel slicing
|
||||
KIRI.work.restart();
|
||||
if (KIRI.work.isSlicing()) KIRI.work.restart();
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
var exports = {
|
||||
COPYRIGHT:"Copyright (C) 2014-2017 Stewart Allen <stewart@neuron.com> - All Rights Reserved",
|
||||
LICENSE:"Unauthorized copying, modification and re-distribution are strictly prohibited without prior written consent.",
|
||||
VERSION:"1.2.0"
|
||||
VERSION:"1.2.1"
|
||||
};
|
||||
if (!module) var module = {};
|
||||
module.exports = exports;
|
||||
|
|
|
|||
Loading…
Reference in a new issue