MCPcopy Create free account
hub / github.com/RetypeOS/parcode / execute_graph

Function execute_graph

src/executor.rs:71–89  ·  view source on GitHub ↗

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,
)

Source from the content-addressed store, hash-verified

69///
70/// * `W`: The writer type. Must implement `std::io::Write` and `Send`.
71pub fn execute_graph<'a, W>(
72 graph: &TaskGraph<'a>,
73 writer: &SeqWriter<W>,
74 registry: &CompressorRegistry,
75 use_compression: bool,
76) -> Result<ChildRef>
77where
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.

Callers 2

writeMethod · 0.85
write_syncMethod · 0.85

Calls 2

execute_graph_parallelFunction · 0.85
execute_graph_serialFunction · 0.85

Tested by

no test coverage detected