Warning: session_start(): open(/var/lib/php/sessions/sess_27rfobvbhj2gu6rs2rck034ru7, 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
sclass Fiber {
Thread runningInThread;
long grabCount;
final Map fiberLocalValues = syncWeakMap();
synchronized void grab {
Thread t = currentThread();
if (runningInThread != null && runningInThread != t)
failWithVars("Trying to assign virtual thread to 2 threads", +thread1 := runningInThread, thread2 := t);
runningInThread = t;
grabCount++;
}
synchronized void release {
Thread t = currentThread();
if (runningInThread != t)
failWithVars("Broken release", +thread1 := runningInThread, thread2 := t);
if (--grabCount == 0)
runningInThread = null;
}
O getFiberLocalValue(IVar fiberLocal) {
ret fiberLocalValues.get(fiberLocal);
}
void setFiberLocalValue(IVar fiberLocal, O value) {
fiberLocalValues.put(fiberLocal, value);
}
void foretFiberLocalValue(IVar fiberLocal) {
fiberLocalValues.remove(fiberLocal);
}
}