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

Is there any reason why Rc<RefCell> is used compared to Arc<Mutex>? #512

Open
sokorototo opened this issue Jul 18, 2024 · 0 comments
Open

Comments

@sokorototo
Copy link

sokorototo commented Jul 18, 2024

RefCell will quietly panic during a double write, but Mutex locks the current thread. Using RefCell limits the code to single-threaded programs, which I assume most services calling RPC aren't?

@sokorototo sokorototo changed the title Is there any reason why Rc<RefCell> is compared to Arc<Mutex>? Is there any reason why Rc<RefCell> is used compared to Arc<Mutex>? Jul 18, 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

No branches or pull requests

1 participant