...even while this situation is unlikely, it needs to be considered: A worker thread might terminate unexpectedly, due to an error; all thread-local objects will be destroyed automatically — while the `EngineBufferManager` might be processing further allocations requested by that very thread, and dispatch them towards an already destroyed `LocalMemPool` This turns out to be a nasty problem, since the whole setup was created to allow the workers to operate independently from each other; any handshake or registration/deregistration mechanism would require a lock of sorts, thereby defeating the whole purpose of the setup. The best solution I could find is to rely on a instance marker hash, that can be checked with an atomic read prior to each dispatch of a memory allocation. The destructor of the local pool would then be able to ''disengage'', by invalidating that hash. To evaluate this solution, I developed this mechanism as a free-standing library component, called `LiveMark` |
||
|---|---|---|
| .. | ||
| draw | ||
| DIR_INFO | ||
| dump | ||
| empty.html | ||
| InterfaceConcept_Varga.mm | ||
| renderengine.html | ||
| thinkPad.ichthyo.mm | ||
| uml | ||
| workflow.mm | ||
| Workflow_Verwijlen.mm | ||