-
Notifications
You must be signed in to change notification settings - Fork 32
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
Provide pid in imports callback context #622
Conversation
Then we can call exported functions in imported functions.
Sorry, there must be some other way to do this: |
When I call the exported function in the imports function callback, there is a timeout exception. Any idea? |
hey @ionull - I believe I know where the timeout comes from. My suspicion is that this is a rust-side mutex the code it waiting on indefinitely that causes the timeout in elixir-land. What happens when rust calls into an elixir function is that we have an unlocked mutex on the |
Hi @tessi , the problem is that GenServer has not replied, and the status is locked on the GenServer side, where you can't call with pid, but we still can use the instance to call the wasm exported function like this: |
uhh, interesting. so I was wrong. Nice to learn something :) I get why this is useful. Could you add a test for this scenario, please, so we can make sure not to break it in the future? |
@tessi Hi, test case done. |
perfect! the case looks great to me. thanks a lot. let's see what CI says and merge when/if it's green :) |
Co-authored-by: Philipp Tessenow <philipp@tessenow.org>
Is there anything else that I should do? |
I wanted to say no, but the formatter is still upset. can you make sure |
@tessi oh, I see. Have done the |
Thanks! And thanks again for your work 💚 |
Then we can call exported functions in imported functions.