-
Notifications
You must be signed in to change notification settings - Fork 64
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
Api 1.8.0 leaves some background thread running. #74
Comments
It's most likely the
Or to avoid the client bookkeeping, just go back to using the default memoized client (by supplied no |
Thanks for the advice, indeed by feeding in the client myself i have control. Good enough for now but looks a tad cumbersome. |
You might also be able to call See also discussion. Particularly this in the old Do you have any recommendations on less cumbersome solutions that don't require one opened-and-closed client per API call? Or maybe that's the better solution -- create and close a new client on each call, if no client is explicitly supplied. I suspect that's not as efficient, though. |
Well in clojure i expect everything to be as side effect free and clean as possible. Messing up one's threading by default is one very proper side effect :( Maybe this is just me. But yes i would expect the default behavior to be clean with a new client every time and optional possibility to feed in a client that is kept alive. Maybe it's better if some other people chip in on the opinion as well. |
That's a very good point. I think you're right about creating a new client and then closing it ASAP. I'm planning a huge backward-breaking fork (or maybe a v2, we'll see) in the diy-callbacks branch. In that API, each endpoint function call takes the user/app credentials as a first required argument. (This is probably how I'll try to do some benchmarking to see how costly it is to create a new client for each call. FYI that memoized client has been in the library for 6+ years, though it may have behaved differently with earlier versions of the |
I stumbled over the same issue. It would be good if the Not all calls seem to be affected by this though. E.g. Another workaround seems to be to exclude |
Good point @bitti, I added a synopsis of the issue to the README: https://github.com/adamwynne/twitter-api#notes-on-making-api-calls In the meantime, I'm leaving this issue open because it'd be better if it didn't require the extra bookkeeping in the first place. |
- compile brings in explore.clj & runs it. use (comment...) - needed to deal with adamwynne/twitter-api#74
I have created a very simple piece of code, pretty much following the example
Sure enough it works until printing the output of users-show. Then emits the expected "wat" ... and then there is silence, the application won't exit. If i comment the users-show out - the application does a clean shutdown. Is there some kind of magic hook that i have to pull? Looks like something is left hanging and jvm figures there is some thread around doing important work still.
The text was updated successfully, but these errors were encountered: