Warning: session_start(): open(/var/lib/php/sessions/sess_rvkupv4u7dndh9ked9i366p5rp, 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
static class Q {
new LinkedBlockingQueue q;
Q() {}
Q(String name, boolean startThread) {
if (startThread)
new Thread(name) {
public void run() {
Q.this.run();
}
}.start();
}
Iterable master() {
return new Iterable() {
public Iterator iterator() {
return new Iterator() {
Runnable x;
public boolean hasNext() ctex {
//debug("hasNext");
while (x == null && licensed())
x = q.poll(1, TimeUnit.SECONDS);
//debug("hasNext true");
return true;
}
public Runnable next() {
if (!licensed()) ret null;
//debug("next");
hasNext();
Runnable _x = x;
x = null;
//debug("next " + structure(x));
return _x;
}
public void remove() {
}
};
}
};
}
void add(Runnable r) {
q.add(r);
}
void run() {
for (Runnable r : master()) {
if (!licensed()) ret;
try {
r.run();
} catch (Throwable e) {
e.printStackTrace();
}
}
}
}