GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||
GeezerVison is showing github.com — Implement remote evaluation and distributed garbage collection by jonatanklosko · Pull Request #46 · livebook-dev/pythonx Conversation
|
|
Currently |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| """ | ||
|
|
||
| defexception [:type, :value, :traceback] | ||
| defexception [:lines] |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Technically it's a breaking change, though ideally I would consider the exception fields to be opaque in this case.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
FTR. I changed it so that we can easily pass Pythonx.Error across nodes without worrying about tracking and going back to the owner for formatting. I don't think storing the separate type, value, traceback objects was a good idea in the first place - if someone is interested in those, they should just have the try-catch in the Python code.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Perhaps we should make it so it will only return the last line? And if they want everything, they can call |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
| if (enif_whereis_pid(caller_env, janitor_name, &janitor_pid)) { | ||
| auto device = type == 0 ? eval_info.stdout_device : eval_info.stderr_device; | ||
| // Copy the device term is from a differnet env, so we copy it into | ||
| // the message env, otherwise we may run into unexpected behaviour. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Which sort of unexpected behaviour?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
So far it has been working fine. Once I was testing remote eval, where stdout_device and stderr_device are remote pid terms, I run into a weird issue where the message we send below would include a random term (e.g. :infinity, {}) instead of the actual pid. I then revisited the code and realised that those terms are from a different env and doing the copy first fixed the issue. It's interesting that it's only remote pid terms that revealed the issue.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Similarly they could return a tuple with the specific values they need. However, the issue with those approach is that there is no way to return separate values to Elixir side, it would be a single |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Beautiful! 😍
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Ok, so we are back to square one... with the difference we would be holding fewer things in memory? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I'm not following. My point is that if we don't return globals, it becomes an actual limitation. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Co-authored-by: José Valim <[email protected]>
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.