# dok/paper/fail-boxes-resource-management

It is a syntax and semantic for describing when threads depends from each other, and managing errors in the proper way in case of excetpions, and resource deallocation.

The paper says that a problem is that unchecked-exceptions like OutOfRam and similar can happen in every point of a computation and so the finally part can work in an inconsistent state, and reasoning about the application is more difficult. Failboxes should be a solution to this problem.

Failboxes have this simple semantic

• x := currentfb;
• x := newfb;
• x := newfb(x);
• enter (x) { s } catch { s' }