Warning: session_start(): open(/var/lib/php/sessions/sess_947gj7t0cq4hg468cuge4ftv23, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
// Note: Costs one thread while it exists
sclass RunnablesReferenceQueue is AutoCloseable {
new ReferenceQueue queue;
volatile Thread thread;
new Flag closed;
settable int timeout = 60000; // just for safety
*() {
thread = startThread("RunnablesReferenceQueue", l0 _run);
}
void _run ctex {
try {
while (ping () && !closed!) {
Reference> ref = queue.remove(timeout);
if (ref != null) {
if (ref cast Runnable)
pcallF(ref);
else
warn("RunnablesReferenceQueue: Reference not runnable - " + className(ref));
}
}
} catch InterruptedException {}
} finally {
thread = null;
}
}
close {
closed.raise();
interruptThread(thread);
}
ReferenceQueue queue aka get() { ret queue; }
}