Fork me on GitHub
#nrepl
<
2019-10-28
>
shen08:10:39

There's been some recent work on interrupts (in JVM): https://github.com/nrepl/nrepl/pull/153

bozhidar08:10:57

FYI - I’ve ported the nREPL ops docs generation to cider-nrepl https://docs.cider.mx/cider-nrepl/nrepl-api/ops.html

🎉 8
cider 4
bozhidar08:10:56

Probably at some point we’ll have to make this reusable, so any middleware can use it, but at least I’ve solved the most pressing and long-standing issue of generating some API docs for cider-nrepl itself.

pez08:10:21

That is awesome, @bozhidar!!!

shen08:10:40

I can't remember if we can interrupt a thread that was spawned by the main session thread, but if if we are using a shared thread pool to run a fn, then without some knowledge of the threadpool, not sure how we can just interrupt something running in it?

shen08:10:49

(sorry, interlacing the conversation)

pez08:10:06

¯\(ツ)

bozhidar08:10:07

@shen If we can do this, that’d be great, but I’m not sure how we can get any insight as to where exactly some thread spawned from the main thread ended up.

bozhidar08:10:42

I never really looked into this, though. I just assumed it probably wasn’t feasible (or it was pretty hard) if Chas didn’t implement it initially.

shen08:10:14

Do you know about the interrupting non-pooled thread part?

bozhidar13:10:13

@shen What about it exactly? I don’t think we have any provisions for interrupting anything besides the session thread.

bozhidar13:10:45

I think that even to be able to track the relationship between parent and child threads we need some explicit tracking with a ThreadGroup or something similar.

bozhidar13:10:09

If I recall correctly Java threads don’t keep any info about the their children/parent threads.

dominicm13:10:34

I've never heard of that happening.

shen13:10:05

Ok. I wasn't sure if we had some way of doing that

shen13:10:12

sounds like a no then

shen13:10:28

the code quoted just creates the main session thread, right?