nrepl

https://github.com/nrepl/nrepl || https://nrepl.org
shen 2019-10-28T08:28:39.144Z

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

shen 2019-10-28T08:28:49.144300Z

and https://github.com/nrepl/nrepl/pull/163

bozhidar 2019-10-28T08:35:57.146600Z

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

12🎉
bozhidar 2019-10-28T08:36:56.147600Z

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.

pez 2019-10-28T08:42:21.148100Z

That is awesome, @bozhidar!!!

shen 2019-10-28T08:42:40.148500Z

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?

shen 2019-10-28T08:42:49.148800Z

(sorry, interlacing the conversation)

pez 2019-10-28T08:43:06.148900Z

¯\(ツ)

bozhidar 2019-10-28T08:45:07.150100Z

@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.

bozhidar 2019-10-28T08:45:42.151Z

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.

shen 2019-10-28T08:46:14.151800Z

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

bozhidar 2019-10-28T13:03:13.154200Z

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

bozhidar 2019-10-28T13:04:45.155Z

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.

bozhidar 2019-10-28T13:05:09.155600Z

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

dominicm 2019-10-28T13:07:34.156100Z

I've never heard of that happening.

shen 2019-10-28T13:14:05.156800Z

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

shen 2019-10-28T13:14:12.157100Z

sounds like a no then

shen 2019-10-28T13:14:28.157500Z

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