Entry point for the execution engine. This function consumes the graph (conceptually) and drives the I/O writing process. It returns the `ChildRef` of the Root Chunk, which is needed to write the Global Header. # Type Parameters `W`: The writer type. Must implement `std::io::Write` and `Send`.
(
graph: &TaskGraph<'a>,
writer: &SeqWriter<W>,
registry: &CompressorRegistry,
use_compression: bool,
)
| 69 | /// |
| 70 | /// * `W`: The writer type. Must implement `std::io::Write` and `Send`. |
| 71 | pub fn execute_graph<'a, W>( |
| 72 | graph: &TaskGraph<'a>, |
| 73 | writer: &SeqWriter<W>, |
| 74 | registry: &CompressorRegistry, |
| 75 | use_compression: bool, |
| 76 | ) -> Result<ChildRef> |
| 77 | where |
| 78 | W: Write + Send, |
| 79 | { |
| 80 | #[cfg(all(feature = "parallel", not(target_arch = "wasm32")))] |
| 81 | { |
| 82 | execute_graph_parallel(graph, writer, registry, use_compression) |
| 83 | } |
| 84 | |
| 85 | #[cfg(any(not(feature = "parallel"), target_arch = "wasm32"))] |
| 86 | { |
| 87 | execute_graph_serial(graph, writer, registry, use_compression) |
| 88 | } |
| 89 | } |
| 90 | // ------------ |
| 91 | |
| 92 | /// Executes the graph in parallel using Rayon. |
no test coverage detected