Re: Socket servers, threads, and redirecting error output.

2021-01-02 Thread Justin Smith
By the time the exception is caught, you are already outside the context of the Thread which the repl client is interacting with. The default exception handler has no information tying the executing thread to the repl process (not to mention the dynamic variables clojure is using to associate

Re: Socket servers, threads, and redirecting error output.

2021-01-02 Thread Austin Haas
Thank you very much for the explanation, Justin. I don't see how I can use futures, though, without blocking on the main thread (to get the exception when it occurs). I'm spawning a long-running process that never returns a value. On Saturday, January 2, 2021 at 12:43:14 AM UTC-8

Re: Socket servers, threads, and redirecting error output.

2021-01-02 Thread Justin Smith
to be clear, in my second example you see the error from the future without using deref good luck finding your solution On Sat, Jan 2, 2021 at 12:50 PM Austin Haas wrote: > Thank you very much for the explanation, Justin. > > I don't see how I can use futures, though, without blocking on the

Re: Socket servers, threads, and redirecting error output.

2021-01-02 Thread Austin Haas
Ah, thanks for pointing that out. I must've overlooked your example, because I'd already written off futures. It seems like what you are suggesting, catch and print, might be about as good as I could hope for. If I don't want to block the main thread, then I don't see what else I could