RAII struct to cover extern callbacks. Nowadays it only deals with FPU/SSE control words save/restore.
When we used a D runtime, this used to manage thread attachment and deattachment in each incoming exported function.
Calling this on callbacks is still mandatory, since changing floating-point control work can happen and create issues.
Call this in each callback.
extern(C) myCallback() { ScopedForeignCallback!(false, true) cb; cb.enter();
// Rounding mode preserved here... }
See Implementation
RAII struct to cover extern callbacks. Nowadays it only deals with FPU/SSE control words save/restore.
When we used a D runtime, this used to manage thread attachment and deattachment in each incoming exported function.
Calling this on callbacks is still mandatory, since changing floating-point control work can happen and create issues.