Render Kino.JS component outside Livebook process. Output data no longer available. #1395
-
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This happens is because I assume there is a place/function you call in the notebook to run the tests, right? You should create and render the output from that function. Maybe add a Sidenote: one way to render an output from a temporary process would be to spawn another process that creates and renders the output, then sleeps forever, and then we kill that process when the output is no longer needed. But this requires thinking carefully where the output should be garbage collected and is a bit hacky. |
Beta Was this translation helpful? Give feedback.
This happens is because
Kino.JS(.Live)
needs to be garbage collected, so its lifetime is usually tied to the process that creates it (or the cell).I assume there is a place/function you call in the notebook to run the tests, right? You should create and render the output from that function. Maybe add a
receive
and make the formatter so that it sends a message back, or something like that?Sidenote: one way to render an output from a temporary process would be to spawn another process that creates and renders the output, then sleeps forever, and then we kill that process when the output is no longer needed. But this requires thinking carefully where the output should be garbage collected …