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

Raise exception if Process.play() called on closed process #208

Open
chrisjsewell opened this issue Feb 17, 2021 · 3 comments
Open

Raise exception if Process.play() called on closed process #208

chrisjsewell opened this issue Feb 17, 2021 · 3 comments

Comments

@chrisjsewell
Copy link
Member

As of 7004bd9, a paused workchain will hang if it is closed then played. This manifested in an aiida-core test (aiidateam/aiida-core#4751)

Perhaps as a "safety measure" Process.play() should raise an exception if it is called on a closed process, and maybe other methods?

@sphuber
Copy link
Collaborator

sphuber commented Feb 17, 2021

Just want to mention here that so far it has been a common use case to rely on the behavior that playing a non-paused process should be simply a no-op and not raise. There are some bugs in aiida-core that are yet unsolved that can leave the state between node and actual process to be out of sync. Playing all processes can often coax them back into sync. If incorrect plays are going to start raising this might have undesired side effects here

@chrisjsewell
Copy link
Member Author

hey thanks @sphuber can you review aiidateam/aiida-core#4751 quickly?

@chrisjsewell
Copy link
Member Author

Just want to mention here that so far it has been a common use case to rely on the behavior that playing a non-paused process should be simply a no-op and not raise.

but are these non-paused processes already closed?

If incorrect plays are going to start raising this might have undesired side effects here

yep we could always make it no-op, although this may make it harder to understand why playing a process is not working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants