Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sessions don't play well with futures and agents #22

Closed
robhanlon22 opened this issue Sep 25, 2020 · 1 comment · May be fixed by #24
Closed

Sessions don't play well with futures and agents #22

robhanlon22 opened this issue Sep 25, 2020 · 1 comment · May be fixed by #24

Comments

@robhanlon22
Copy link
Contributor

I've been running into an issue where a library I use internally spawns a future which eventually calls back into my application code. Since futures are run on a thread pool initialized by Clojure, they lose the value of the inheritable thread local and are thus unable to tell which session they're associated with. It seems like a way to handle this would be to use a binding rather than a new Thread in with-session, and perhaps provide a function that could be used to convey the session to new threads.

@aroemers
Copy link
Owner

aroemers commented Dec 4, 2022

This is indeed a documentend known issue. A binding would have the same issue. The (unfinished) 3.x branch has a proper solution for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants