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

ERL-302: rpc:yield() does not work from another pid #3425

Closed
OTP-Maintainer opened this issue Nov 18, 2016 · 2 comments
Closed

ERL-302: rpc:yield() does not work from another pid #3425

OTP-Maintainer opened this issue Nov 18, 2016 · 2 comments
Assignees
Labels
bug Issue is reported as a bug priority:low team:VM Assigned to OTP team VM
Milestone

Comments

@OTP-Maintainer
Copy link

Original reporter: jimdigriz
Affected version: OTP-19.1
Fixed in version: OTP-19.2
Component: Not Specified
Migrated from: https://bugs.erlang.org/browse/ERL-302


Whilst getting to grips with erlang (and having fun!) I ran into a problem in which a call I make to rpc:async_call() then never yields.

I am guessing this could be caused by yield() under-the-hood using mailbox messaging and of course so when I try to yield from another pid it never sees that message.

This I am OK with, if it is not considered a bug, but then most definitely something that should be mentioned in the docs:

http://erlang.org/doc/man/rpc.html#nb_yield-2

Maybe have yield()/nb_yield() complain about it being a invalid key as someone like me tries to foolishly yield from a different pid too?

Anyway, attached is a small test module showing this behaviour, tested on the esl-erlang Debian package from Errlang Solutions, version 1:19.1.5.
@OTP-Maintainer
Copy link
Author

vladdu said:

I wouldn't call this a bug, but it is possible to implement it differently so that yield can be called from any process. The question is whether this would be desirable.

The documentation for `async_call` and `*yield` should mention that they all need to be called from the same process. Could you please write a PR for that?


@OTP-Maintainer
Copy link
Author

jimdigriz said:

https://github.com/erlang/otp/pull/1252

@OTP-Maintainer OTP-Maintainer added bug Issue is reported as a bug team:VM Assigned to OTP team VM priority:low labels Feb 10, 2021
@OTP-Maintainer OTP-Maintainer added this to the OTP-19.2 milestone Feb 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is reported as a bug priority:low team:VM Assigned to OTP team VM
Projects
None yet
Development

No branches or pull requests

2 participants