Skip to content

Commit a321c99

Browse files
authored
Adding a Sync trait boundary to the ingest function's callback. (#3685)
The boundary is necessary to make the resulting future `Send`. (Reference of `Sync` is `Send`). `Send` is needed to tokio::task:spawn futures.
1 parent d37e9bb commit a321c99

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

quickwit/quickwit-rest-client/src/rest_client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ impl QuickwitClient {
255255
index_id: &str,
256256
ingest_source: IngestSource,
257257
batch_size_limit_opt: Option<usize>,
258-
on_ingest_event: Option<&dyn Fn(IngestEvent)>,
258+
on_ingest_event: Option<&(dyn Fn(IngestEvent) + Sync)>,
259259
last_block_commit: CommitType,
260260
) -> Result<(), Error> {
261261
let ingest_path = format!("{index_id}/ingest");

0 commit comments

Comments
 (0)