-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Q: Is it a good way to user ClientSession like this? #3604
Comments
GitMate.io thinks the contributor most likely able to help you is @asvetlov. Possibly related issues are #2861 (Is there any way to not re-encode url passed to ClientSession._request() ?), #329 (Unittests for ClientSession), #2451 (Documentation for ClientSession), #3245 (good design!), and #752 (There is no way to 'del_route'). |
or use |
But I have a problem. I must create an object in the main thread and share the object with another thread ( But don't worry, I use asyncio.run_coroutine_threadsafe(coro, loop) to make methods thread-safe).
|
It can work (I don't know what is |
Yeah, so can you help me to make it better? It confused me for a week. |
Or this?
|
I still can't make it. I must create an object in the main thread and share the object with another thread ( I input sth in this thread to control the tasks running in the main thread). So is there a good way to make this? I have to figure it about. So please help me. |
@asvetlov I think I made it. Would you like to have a look and give me some advice about this?
|
@asvetlov Hi, would you like to check my solution and help me to improve? |
Maybe this is the best way I can find. Anyway thank you, @samuelcolvin and @asvetlov. |
I want to use one ClientSession to handle many requests(same host).
The text was updated successfully, but these errors were encountered: