Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arc<EventStoreClient> to Rc<EventStoreClient> #1668

Merged
merged 2 commits into from
Apr 22, 2024

Conversation

AlexErrant
Copy link
Contributor

Pull Request Template

Checklist

  • Confirmed that run-checks all script has been executed.
    ^ nope; let's see what CI thinks
  • Made sure the book is up to date with changes in this PR.

Related Issues/PRs

None

Changes

I saw an opportunity to convert an Arc to an Rc and took it. Is this a good idea? IDK I suck at Rust.

Testing

None.

Copy link

codecov bot commented Apr 20, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 86.41%. Comparing base (1433284) to head (28d573a).

Files Patch % Lines
crates/burn-train/src/learner/builder.rs 0.00% 1 Missing ⚠️
crates/burn-train/src/metric/processor/full.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1668   +/-   ##
=======================================
  Coverage   86.41%   86.41%           
=======================================
  Files         694      694           
  Lines       80686    80686           
=======================================
+ Hits        69727    69728    +1     
+ Misses      10959    10958    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@antimora
Copy link
Collaborator

The change seems random. For a proper record we need a better explanation why we are making this change. Arc is used for multithreading. Are you suggesting with your changes, it's thread-safe?

@AlexErrant
Copy link
Contributor Author

AlexErrant commented Apr 21, 2024

I think it should be threadsafe; otherwise wouldn't Rust's type system tell us? (A simple "lol no" and closing of this PR would be answer enough 😅)

@nathanielsimard
Copy link
Member

We could in fact use Rc in the burn train crate, since most of the things is actually synchronous!

@nathanielsimard nathanielsimard merged commit d62b344 into tracel-ai:main Apr 22, 2024
14 checks passed
@AlexErrant AlexErrant deleted the arc_to_rc branch April 22, 2024 22:38
syl20bnr pushed a commit that referenced this pull request Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants