Dimitrios Piliouras
Dimitrios Piliouras
A bit more testing on all those `badssl` URLs shows that my new `default-client-https` behaves exactly like `(.openStream (URL. "https://..."))` on Java12. Observe this: ```clj (slurp (.openStream (java.net.URL. "https://wrong.host.badssl.com"))) =>...
@pmonks A stateful scheduler which keeps track of active jobs (id => cancel-fn) is pretty trivial to do on-top of `chime`. In particular you can leverage the `:on-finished` callback to...
@pmonks `chime` doesn't keep track of any such information. It may be illuminating to have a look at the source, but `chime` is essentially a lazy scheduling loop. You provide...
@pmonks I am going to try to complement @jarohen 's answers - hope this helps you. > how are the one-shot jobs not being GCed, given the references to them...
The behaviour of `.shutdownNow()` (as seen from consumers) can be simulated with a `cancelled?` (`AtomicBoolean`) flag, can't it? Instead of calling `(f time) true`, you would call `(when (false? (.get...
BTW, I tried out the approach described in my previous comment, and the only test that breaks is this (for obvious reasons): ```clj FAIL in (test-cancelling-overrunning-task) (core_test.clj:111) expected: (instance? InterruptedException...
A complementary approach would be to let consumers choose how the executor is shutdown (i.e. `:orderly` VS `:abruptly`), defaulting to the latter for backwards-compatibility. Here is a sketch: ```clj (let...
I retract my last two comments! There is already a `!latch` that can be leveraged: ```clj (when-not (realized? !latch) (f time) true) ``` This allows moving to `.shutdown()` w/o introducing...
I'm trying to digest the following comment (seen a few messages above): > One example of prior art here would be the difference between ExecutorService's shutdown and shutdownNow methods -...
Hi @jarohen, See my comments inline: > Users may want both shutdown and shutdownNow behaviour We may arrive at this conclusion in the end, but it is kind of premature...