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

Cleanup coroutine threadsafe #27080

Merged
merged 5 commits into from Oct 1, 2019

Conversation

@pvizeli
Copy link
Member

commented Sep 30, 2019

Description:

Cleanup the run_callback_threadsafe and use that from asyncio/CPython with own guard without a function frame in the middle. We don't use that function anyway not many times since we full rewritten the core to async.

Return a concurrent.futures.Future to access the result.
"""
ident = loop.__dict__.get("_thread_ident")

This comment has been minimized.

Copy link
@balloob

balloob Sep 30, 2019

Member

We will lose this check. I guess it's ok because we have migrated the whole core to asyncio

This comment has been minimized.

Copy link
@pvizeli

pvizeli Sep 30, 2019

Author Member

yep and asyncio have his own guard now

This comment has been minimized.

Copy link
@balloob

balloob Sep 30, 2019

Member

oh perfect.

This comment has been minimized.

Copy link
@balloob

balloob Sep 30, 2019

Member

Did you see if we use _thread_ident still or can we remove it ?

This comment has been minimized.

Copy link
@pvizeli

pvizeli Oct 1, 2019

Author Member

Ident, we can remove it. on all our function we call loop.call_soon_threadsafe(run_callback) which is guard by asyncio

This comment has been minimized.

Copy link
@pvizeli

pvizeli Oct 1, 2019

Author Member

We need it currently for logging. I will rewrite this abstraction to next beta, so we can remove that guards complete. For now, it should be fine

Dev automation moved this from Needs review to Reviewer approved Sep 30, 2019
pvizeli added 4 commits Oct 1, 2019
@pvizeli pvizeli merged commit c1851a2 into dev Oct 1, 2019
10 of 11 checks passed
10 of 11 checks passed
codecov/patch 72.72% of diff hit (target 94.3%)
Details
CI Build #20191001.53 succeeded
Details
CI (FullCheck Mypy) FullCheck Mypy succeeded
Details
CI (FullCheck Pylint) FullCheck Pylint succeeded
Details
CI (Overview CheckFormat) Overview CheckFormat succeeded
Details
CI (Overview Lint) Overview Lint succeeded
Details
CI (Overview Validate) Overview Validate succeeded
Details
CI (Tests PyTest Python36) Tests PyTest Python36 succeeded
Details
CI (Tests PyTest Python37) Tests PyTest Python37 succeeded
Details
cla-bot Everyone involved has signed the CLA
codecov/project 94.31% (target 90%)
Details
Dev automation moved this from Reviewer approved to Done Oct 1, 2019
@delete-merged-branch delete-merged-branch bot deleted the coro-threadsafe branch Oct 1, 2019
@lock lock bot locked and limited conversation to collaborators Oct 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.