Page MenuHomePhabricator

Define tokio runtime
AbandonedPublic

Authored by marcin on Sep 5 2022, 7:42 AM.
Tags
None
Referenced Files
F3396286: D5053.diff
Sun, Dec 1, 11:35 AM
Unknown Object (File)
Fri, Nov 29, 10:49 AM
Unknown Object (File)
Sat, Nov 9, 7:40 AM
Unknown Object (File)
Tue, Nov 5, 11:26 AM
Unknown Object (File)
Oct 23 2024, 10:07 AM
Unknown Object (File)
Oct 23 2024, 10:07 AM
Unknown Object (File)
Oct 16 2024, 11:38 PM
Unknown Object (File)
Oct 16 2024, 11:37 PM

Details

Summary

This differential creates static variable with tokio runtime. This runtime will be used to execute tasks with gRPC calls.

Test Plan

Cargo build from prject root

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

marcin requested review of this revision.Sep 5 2022, 7:52 AM
tomek added 1 blocking reviewer(s): jon.
tomek added inline comments.
native/cpp/CommonCpp/grpc/blob_client/rust/src/lib.rs
10 ↗(On Diff #16330)

Do we really need to use Arc?

native/cpp/CommonCpp/grpc/blob_client/rust/src/lib.rs
10 ↗(On Diff #16330)

No, global singletons do not need Arc.

karol has moved this work to https://linear.app/comm/issue/ENG-1732

native/cpp/CommonCpp/grpc/blob_client/rust/src/lib.rs
10 ↗(On Diff #16330)

Agree, Arc is not needed here. I will use Rc instead.

native/cpp/CommonCpp/grpc/blob_client/rust/src/lib.rs
10 ↗(On Diff #16330)

Sorry for the confusion above - actually I do not even need Rc<> here.

This revision is now accepted and ready to land.Sep 7 2022, 12:50 PM
native/cpp/CommonCpp/grpc/blob_client/rust/src/lib.rs
14

Should this unwrap call be here? Context here, cc @varun @jon

This revision now requires review to proceed.Sep 15 2022, 12:34 PM
native/cpp/CommonCpp/grpc/blob_client/rust/src/lib.rs
14

Generally I prefer expect. At least it emits an error message which then you can search for in the code base.

I created this revision when I thought my blob client will be a separate binary. But we agreed that we will have one Rust crate for all native gRPC so I assume that my blob client will be using the same runtime that is already defined in grpc_client/src/lib.rs and used by identity client. So we can either abandon this revision, or use it to update runtime definition that is already on master once grpc_client refactor is done.

unwrap is fine, but as @marcin said this diff should just be discarded or used to modify the runtime here

Refactor after varun's changes. Introduced changes to runtime declaration - Wrapping in Arc is not necessary

This revision is now accepted and ready to land.Sep 19 2022, 11:05 AM

Diff from 2022 what I was assigned encrypted blob upload work.