MCPcopy Index your code
hub / github.com/aws/aws-lambda-rust-runtime / run_concurrent

Function run_concurrent

lambda-runtime/src/lib.rs:185–199  ·  view source on GitHub ↗
(handler: F)

Source from the content-addressed store, hash-verified

183#[cfg(feature = "concurrency-tokio")]
184#[cfg_attr(docsrs, doc(cfg(feature = "concurrency-tokio")))]
185pub async fn run_concurrent<A, F, R, B, S, D, E>(handler: F) -> Result<(), Error>
186where
187 F: Service<LambdaEvent<A>, Response = R> + Clone + Send + 'static,
188 F::Future: Future<Output = Result<R, F::Error>> + Send + 'static,
189 F::Error: Into<Diagnostic> + fmt::Debug,
190 A: for<'de> Deserialize<'de> + Send + 'static,
191 R: IntoFunctionResponse<B, S> + Send + 'static,
192 B: Serialize + Send + 'static,
193 S: Stream<Item = Result<D, E>> + Unpin + Send + 'static,
194 D: Into<bytes::Bytes> + Send + 'static,
195 E: Into<Error> + Send + Debug + 'static,
196{
197 let runtime = Runtime::new(handler).layer(layers::TracingLayer::new());
198 runtime.run_concurrent().await
199}
200
201/// Spawns a task that will be execute a provided async closure when the process
202/// receives unix graceful shutdown signals. If the closure takes longer than 500ms

Callers

nothing calls this directly

Calls 2

run_concurrentMethod · 0.80
layerMethod · 0.45

Tested by

no test coverage detected