# Objective - Fixes #19910. ## Solution - First, allow extraction function to be FnMut instead of Fn. FnMut is a superset of Fn anyway, and we only ever call this function once at a time (we would never call this in parallel for different pairs of worlds or something). - Run the `RenderStartup` schedule in the extract function with a flag to only do it once. - Remove all the `MainRender` stuff. One sad part here is that now the `RenderStartup` blocks extraction. So for pipelined rendering, our simulation will be blocked on the first frame while we set up all the rendering resources. I don't see this as a big loss though since A) that is fundamentally what we want here - extraction **has to** run after `RenderStartup`, and the only way to do better is to somehow run `RenderStartup` in parallel with the first simulation frame, and B) without `RenderStartup` the **entire** app was blocked on initializing render resources during Plugin construction - so we're not really losing anything here. ## Testing - I ran the `custom_post_processing` example (which was ported to use `RenderStartup` in #19886) and it still works. |
||
|---|---|---|
| .. | ||
| app.rs | ||
| hotpatch.rs | ||
| lib.rs | ||
| main_schedule.rs | ||
| panic_handler.rs | ||
| plugin_group.rs | ||
| plugin.rs | ||
| propagate.rs | ||
| schedule_runner.rs | ||
| sub_app.rs | ||
| task_pool_plugin.rs | ||
| terminal_ctrl_c_handler.rs | ||