mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-08 01:00:15 +02:00
This is changes the interface of CodeBuffer to that of a partially persistent data structure based on reference counting: - Exactly one CodeBuffer is now designated as "active", which means data can be *appended* to it - Lossy modifications to the active CodeBuffer will not invalidate any data in use by other threads, which enables save sharing across threads - Instead, such lossy modifications trigger a new "version" of the data in the modifying thread. Old versions of the CodeBuffer persist as read-only data for use by the other threads. - The other threads can update their version of the CodeBuffer. This will decrease the reference count and eventually trigger deallocation of the old version