You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Can IJulia Jupyter/Pluto run on Linux without JULIA_COPY_STACKS=1? #145
changed the title [-]Can IJulia Jupyter/Pluto run on Linux without `JULIA_COPY_STACKS=1`?[/-][+]Can IJulia Jupyter/Pluto run on Linux without JULIA_COPY_STACKS=1?[/+]on May 14, 2021
The only other way is for JavaCall to run on the root Task. You can check if you are on the root task by comparing Base.roottask with Base.current_task():
Another way to do that is to have two Julia processes. One uses JavaCall while the other runs the notebook. You invoke Java commands by communicating between the two Julia proceses using something like RemoteChannel. At this point though, maybe using something like ZeroMQ via ZMQ.jl makes more sense.
Looking at IJulia, what you probably would need to do is create a custom kernel.jl which loads JavaCall and TaskWorkers, and then runs @async IJulia.waitloop() just before starting the worker.
The key is getting a TaskWorker to run on the root Task before Pluto or
Jupyter runs on it. Once you own the root Task, TaskWorkers allows you
send arbitrary code to run on it.
The underlying issue is that the root Task stack looks normal to the JVM
signal handler whereas the stack of other Tasks is nontraditional.
COPY_STACKS copies the entire stack including the JVM signal handler.
On Sun, May 16, 2021, 12:22 PM Felix Wechsler ***@***.***> wrote:
Hm looks tricky 😕
But would it be possible that View5D could manage the TaskWorkers.jl stuff
to ensure that when it is called from within Pluto it calls the root task?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#145 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB5QOMZLI5DMIWOURXR2WFLTN7WMZANCNFSM444FQRKQ>
.
Activity
[-]Can IJulia Jupyter/Pluto run on Linux without `JULIA_COPY_STACKS=1`?[/-][+]Can IJulia Jupyter/Pluto run on Linux without JULIA_COPY_STACKS=1?[/+]mkitti commentedon May 14, 2021
The only other way is for JavaCall to run on the root
Task. You can check if you are on the root task by comparingBase.roottaskwithBase.current_task():If you can first start JavaCall on the root task, then you can use something like https://github.com/mkitti/TaskWorkers.jl to run a server task on the root Task to talk to Java.
Another way to do that is to have two Julia processes. One uses JavaCall while the other runs the notebook. You invoke Java commands by communicating between the two Julia proceses using something like
RemoteChannel. At this point though, maybe using something like ZeroMQ via ZMQ.jl makes more sense.mkitti commentedon May 14, 2021
Looking at IJulia, what you probably would need to do is create a custom kernel.jl which loads JavaCall and TaskWorkers, and then runs
@async IJulia.waitloop()just before starting the worker.https://github.com/JuliaLang/IJulia.jl/blob/cc2a9bf61a2515596b177339f9a3514de8c38573/src/kernel.jl
roflmaostc commentedon May 16, 2021
Hm looks tricky 😕
But would it be possible that View5D could manage the TaskWorkers.jl stuff to ensure that when it is called from within Pluto it calls the root task?
mkitti commentedon May 17, 2021
mkitti commentedon May 26, 2021
I'm checking in to see if you made any progress on this.
roflmaostc commentedon May 27, 2021
Sorry, I haven't really tried to solve this.
Maybe @RainerHeintzmann wants to tackle this 😄