"RokuJoel" wrote:
The active channel is not paused while a screensaver runs, the Screensaver runs in a separate thread and the channel continues to run. If the Screensaver it is signed with the same Dev ID as the channel, you will be able to pass data back and forth between the running channel and screensaver by writing files to the shared tmp:/ folder.
Thank you, RokuJoel - that short explanation helped me a lot to grasp how sandboxing is done in this case, so credit due.
Including to imply (then test) that variables are not shared between
main() and
RunScreenSaver(). Since there is no shared memory, we should not talk about "threads" from outside developer point of view; logically these are more of (pseudo)processes, even if physically implemented by C threads in Roku executable.
Besides tmp:/, I found another means for main/screensaver "interprocess" communication: roRegistry. Registry i think is better choice for fast messaging between the two, since all happens in RAM and there is no need to reg.
flush() - one can do reg.
write() and the other right away reg.
read() and see the result. Let me know if there is issue with relying on that behavior.