Skip to content

Commit fb31f89

Browse files
committed
prepare in parallel
1 parent f14b84d commit fb31f89

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

source/s3_auto_ranged_put.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <aws/common/encoding.h>
1313
#include <aws/common/string.h>
1414
#include <aws/io/stream.h>
15+
#include <aws/io/event_loop.h>
1516

1617
/* TODO: better logging of steps */
1718

@@ -992,9 +993,11 @@ struct aws_future_http_message *s_s3_prepare_upload_part(struct aws_s3_request *
992993
request->request_body.capacity = request_body_size;
993994
}
994995

996+
struct aws_event_loop *loop = aws_event_loop_group_get_next_loop(request->meta_request->client->body_streaming_elg);
997+
995998
part_prep->asyncstep_read_part = aws_s3_meta_request_read_body(meta_request, offset, &request->request_body);
996-
aws_future_bool_register_callback(
997-
part_prep->asyncstep_read_part, s_s3_prepare_upload_part_on_read_done, part_prep);
999+
aws_future_bool_register_event_loop_callback(
1000+
part_prep->asyncstep_read_part, loop, s_s3_prepare_upload_part_on_read_done, part_prep);
9981001
} else {
9991002
/* Not the first time preparing request (e.g. retry).
10001003
* We can skip over the async steps that read the body stream */

0 commit comments

Comments
 (0)