-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Token
type is !Send + !Sync
#6478
Comments
Hey there, are you talking about right here? solana-program-library/token/client/src/token.rs Lines 383 to 386 in ce0389b
And could you maybe elaborate on what the motivation would be to add this change? It's not immediately clear from the description. Thanks! |
hey @buffalojoec, I was talking about the type below. From what I can see from the fields, it seems like the type was made in order to be solana-program-library/token/client/src/token.rs Lines 331 to 342 in ce0389b
|
@greged93 Sorry I'm just getting back here! Yeah I think making |
Great! Can you assign the issue? |
Why can't we directly send Token between threads? I think this is necessary to fully utilize multithreading |
If ProgramClient cannot be sent or synchronized directly between threads, how should it be handled in concurrent scenarios? I believe it needs to be implemented with the Send and Sync traits to address multithreading concurrency issues. |
The Token type in
token/client/src/token.rs
seems to have been designed in order to beSend + Sync
, given the fact thatArc
was used for the different fields. However, marker traitsSend + Sync
are not added to the traits objects and as such failsToken
fails to capture this feature.I'm willing to implement this if the issue is accepted.
The text was updated successfully, but these errors were encountered: