A.
Good to know and I suppose Visor.jl does that:
Visor
is influenced by Erlang Supervisor design principles
since Erlang is, if I recall, based on process architecture. Also PostgreSQL (except on Windows, then threads I believe used).
@andrey2185, I suppose you CAN and rather should use Malt.jl, since it also works on Windows, by making a timeout function similar to @attdona’s just calling the friendly Malt.stop
instead of using Visor (Visor is basically for restarts, which is overkill):
I was expecting Visor to use Distributed.jl o or some alternative like Malt, but I don’t see that nor how it works except:
B.
I’m just curious, since you CAN kill processes, and it’s very clean, it will close files, and not lose data, IF correctly implemented… why can’t you make threads and kill those thread in your program?
[In short I think you CAN kill threads, but to do it will they need to cooperate and they don’t and nothing is Julia forces them to. I would both like to know how you can kill threads, and add, you can with some C hack, not yet add from Julia, nor I suppose kill from Julia?]
To answer my question, I think I recall reading that you can’t always kill threads and it’s a libc problem (or kernel problem?), as opposed to a Julia problem. I’m just thinking why exactly. I suppose you can kill the thread, but if it has locked something it will never unlock, so it might work in some cases as in with “lock free programming”. Another problem is that files might not be flushed and closed and finalizers not run, or would they be, for relevant parts?