mirror of
https://github.com/9001/copyparty.git
synced 2026-08-13 13:53:06 -06:00
js: while(apop)
This commit is contained in:
parent
2880117265
commit
2c4033831f
|
|
@ -2512,6 +2512,7 @@ function up2k_init(subtle) {
|
|||
keepalive = t.keepalive,
|
||||
me = Date.now();
|
||||
|
||||
while (apop(st.todo.handshake, t));
|
||||
if (t.done)
|
||||
return console.log('done; skip hs', t.name, t);
|
||||
|
||||
|
|
|
|||
|
|
@ -1199,8 +1199,10 @@ function has(haystack, needle) {
|
|||
|
||||
function apop(arr, v) {
|
||||
var ofs = arr.indexOf(v);
|
||||
if (ofs !== -1)
|
||||
if (ofs !== -1) {
|
||||
arr.splice(ofs, 1);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1466,7 +1468,7 @@ function Debounce(delay) {
|
|||
};
|
||||
|
||||
r.rm = function (fun) {
|
||||
apop(r.q, fun);
|
||||
while (apop(r.q, fun));
|
||||
};
|
||||
|
||||
r.run = function () {
|
||||
|
|
@ -1526,7 +1528,7 @@ var timer = (function () {
|
|||
};
|
||||
|
||||
r.rm = function (fun) {
|
||||
apop(r.q, fun);
|
||||
while (apop(r.q, fun));
|
||||
};
|
||||
|
||||
var doevents = function () {
|
||||
|
|
|
|||
Loading…
Reference in a new issue