Skip to content

Commit

Permalink
Adding a Sync trait boundary to the ingest function's callback. (#3685)
Browse files Browse the repository at this point in the history
The boundary is necessary to make the resulting future `Send`.
(Reference of `Sync` is `Send`).

`Send` is needed to tokio::task:spawn futures.
  • Loading branch information
fulmicoton authored Jul 25, 2023
1 parent d37e9bb commit a321c99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion quickwit/quickwit-rest-client/src/rest_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ impl QuickwitClient {
index_id: &str,
ingest_source: IngestSource,
batch_size_limit_opt: Option<usize>,
on_ingest_event: Option<&dyn Fn(IngestEvent)>,
on_ingest_event: Option<&(dyn Fn(IngestEvent) + Sync)>,
last_block_commit: CommitType,
) -> Result<(), Error> {
let ingest_path = format!("{index_id}/ingest");
Expand Down

0 comments on commit a321c99

Please sign in to comment.