-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Multithreaded Client #2321
Multithreaded Client #2321
Conversation
@cavemanloverboy is attempting to deploy a commit to the coral-xyz Team on Vercel. A member of the Team first needs to authorize it. |
This seems cool for sure but looks like a major breaking change / a lot of rewriting will be needed by anyone using the new client? Just because it looks like almost all the functions / a bunch of types need There must be a more ergonomic way to support multi thread than having to add |
I think this is good to merge just two things
Hopefully we can merge and someone of the insane people who use anchor/master to dev off of can give comments on how it affects their client experience! |
BTW this should no longer introduce breaking changes and all tests pass |
Excellent, I will review and merge. Have you added the changelog?
…On Fri, Feb 3, 2023, 7:22 AM cavemanloverboy ***@***.***> wrote:
BTW this should no longer introduce breaking changes and all tests pass
—
Reply to this email directly, view it on GitHub
<#2321 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADAHMGD24XOAKNKVUZM7S2DWVSW3HANCNFSM6AAAAAATCJPB5Q>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I'm going to merge this before it goes on any longer but before releasing the next version of anchor it would be really helpful if you were able to write up something about how to use the new |
Addresses #2218.
This introduces two changes.
S: Signer + Send + Sync
instead of somedyn Signer
. This makes theClient
(and other) typesSend
andSync
.std::rc::Rc
tostd::sync::Arc
so that theClient
(and other) types can be shared across threads. This allows builders to write multithreaded (async, parallel) codes that use ananchor_client::Client
.We also update the
client/example
to include a single and multithreaded test..