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

[bug] Race condition when excute call on go routine #4

Open
himitsuko opened this issue Jun 20, 2022 · 0 comments
Open

[bug] Race condition when excute call on go routine #4

himitsuko opened this issue Jun 20, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@himitsuko
Copy link
Member

himitsuko commented Jun 20, 2022

Description

When define an instance of the call and reuse the contract instance to AddCall or Call in more than 1 routines. The race condition was happen.

Reproduce

abi = call.NewContracBuilder().AddMethod(...)

go func(){
  abi.AddCall(...)
  abi.AddCall(...)
  abi.Call(nil)
}()
go func(){
  abi.AddCall(...)
  abi.AddCall(...)
  abi.Call(nil)
}()

Expected

Optimize it for the threadsafe

@himitsuko himitsuko added the bug Something isn't working label Jun 20, 2022
@himitsuko himitsuko self-assigned this Jun 20, 2022
@himitsuko himitsuko mentioned this issue Jun 20, 2022
@himitsuko himitsuko added enhancement New feature or request help wanted Extra attention is needed and removed bug Something isn't working labels Jun 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant