This idea is generated from the development of LANPR, but might also be useful for other render engines as well.
In some cases, a render engine will need to process the copied scene data for a while before anything can be displayed. At the same time, we may not want the UI to be frozen (during viewport preview). So we can do this in a background thread. However, when the background thread is processing the data, the data is deleted by the Depsgrapgh, since the particular draw loop is already concluded by the time our background process ends.
To give a function that tells the Depsgrapgh: "I'm done with your data, you can delete now".
For example, when you need deferred deletion, call something like DEG_evaluated_scene_set_deferred(s), and upon finish processing, call DEG_deferred_evaluation_finished(s).
There could be some more benefits for EEVEE and Cycles as well. For example, When toggling render preview in those render engines, you don't need to wait until the initial blocking loading process finishes, and it's quick to revert to workbench shading if you accidentally switched to render (You don't need to wait until the interface to unstuck).
Any thoughts on this one :) ?