Fork me on GitHub
#nrepl
<
2018-12-12
>
bozhidar10:12:11

@cgrand Looks good to me. The only thing that’s a bit of a problem is that moving the default executor will break cider-nrepl, as there was a bit of code using this implementation detail directly, but that’s not a big deal.

bozhidar10:12:14

I guess it would also be nice to document the new behavior accordingly, although that’d be mostly for us - I highly doubt that anyone relied on the implementation details of the execution.

cgrand10:12:13

in the doc for :interrupt?

bozhidar10:12:51

One more somewhat related thing is the handling of output that we discussed could be improved if we have one thread per session, but I guess this can be done later.

bozhidar10:12:53

@dchelimsky The new Lein 2.8.2 is out! 🙂

cgrand10:12:22

@bozhidar another breaking change is that the configurable excutor to interruptible-eval is ignored — is it used in practice?

cgrand10:12:51

and what do you do in cider-nreplwith the executor?

cgrand10:12:21

Oh, that’s only for tests?

cgrand10:12:06

Having worked on thread management, I’m now wondering if I missed a documentation on the execution model (not the implementation). My understanding: • msgs from different session are concurrent • :eval msgs for a given session are serialized • non-`:eval` msgs for a given session are... concurrent?

bozhidar10:12:13

> @bozhidar another breaking change is that the configurable excutor to interruptible-eval is ignored — is it used in practice?

bozhidar10:12:17

It’s not.

bozhidar10:12:15

> and what do you do in cider-nreplwith the executor?

bozhidar10:12:59

I think that’d be an easy change, so I’m not worried about this.

bozhidar10:12:46

> Having worked on thread management, I’m now wondering if I missed a documentation on the execution model (not the implementation).

bozhidar10:12:51

Your understanding is perfect.

bozhidar10:12:16

I guess we never really documented this, so it’s now only an urban legend. 🙂

cgrand10:12:55

The spooky kind: passed amongst client implementors around campfires...

cgrand10:12:44

Oh and one can’t interrupt a stray eval (an eval on a transient session) anymore

bozhidar10:12:08

The difference between the behavior of eval and non-eval messages was a big argument in favour of moving most of the client functionality to middlewares, as if they constantly evaled some messages to get things like completion candidates that could impact performance negatively.

bozhidar10:12:23

What’s a transient session?

cgrand10:12:07

transient session: non-cloned one

cgrand10:12:29

execution model: thanks for the background; what about serializing execution on session+op? (I don’t have an actual plan, just questioning the statu quo)

bozhidar11:12:14

> execution model: thanks for the background; what about serializing execution on session+op? (I don’t have an actual plan, just questioning the statu quo)

bozhidar11:12:40

I guess it depends on the op - most ops don’t really affect the global state, so it’s fine to run them concurrently. I don’t see a need for serializing individual ops, unless something in the implementation of the op requires it - e.g. I can imagine multiple refresh ops running in parallel might be a bad idea, but I also wonder if that’s something people encounter in practice.

bozhidar11:12:30

Perhaps there could be some flag to force ops to be serialized to make sure they’re safely applied?

bozhidar11:12:39

> transient session: non-cloned one

bozhidar11:12:35

Ah, got it. I’ve been wondering from time to time if we should allow the usage of non-cloned sessions at all. I don’t really see any value in them, but I might be missing something.

bozhidar11:12:56

Yep. Not a big deal, though.

bozhidar12:12:55

@cgrand Thanks! I’ll take a look!