Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d4e3c49ef2 | |||
| d17da09572 |
+1
-1
Submodule src/modules/pluscampaign updated: 6122603115...97bdf8e8e3
+10
-10
@@ -138,7 +138,7 @@ class LeoUI(View):
|
|||||||
to include a pre_timeout task
|
to include a pre_timeout task
|
||||||
which may optionally refresh and hence cancel the timeout.
|
which may optionally refresh and hence cancel the timeout.
|
||||||
"""
|
"""
|
||||||
if self._View__stopped.done():
|
if self._BaseView__stopped.done():
|
||||||
# We are already stopped, nothing to do
|
# We are already stopped, nothing to do
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -160,17 +160,17 @@ class LeoUI(View):
|
|||||||
# The timeout was removed entirely, silently walk away
|
# The timeout was removed entirely, silently walk away
|
||||||
return
|
return
|
||||||
|
|
||||||
if self._View__stopped.done():
|
if self._BaseView__stopped.done():
|
||||||
# We stopped while waiting for the pre timeout.
|
# We stopped while waiting for the pre timeout.
|
||||||
# Or maybe another thread timed us out
|
# Or maybe another thread timed us out
|
||||||
# Either way, we are done here
|
# Either way, we are done here
|
||||||
return
|
return
|
||||||
|
|
||||||
now = time.monotonic()
|
now = time.monotonic()
|
||||||
if self._View__timeout_expiry is not None and now < self._View__timeout_expiry:
|
if self._BaseView__timeout_expiry is not None and now < self._BaseView__timeout_expiry:
|
||||||
# The timeout was extended, make sure the timeout task is running then fade away
|
# The timeout was extended, make sure the timeout task is running then fade away
|
||||||
if self._View__timeout_task is None or self._View__timeout_task.done():
|
if self._BaseView__timeout_task is None or self._BaseView__timeout_task.done():
|
||||||
self._View__timeout_task = asyncio.create_task(self._View__timeout_task_impl())
|
self._BaseView__timeout_task = asyncio.create_task(self._BaseView__timeout_task_impl())
|
||||||
else:
|
else:
|
||||||
# Actually timeout, and call the post-timeout task for cleanup.
|
# Actually timeout, and call the post-timeout task for cleanup.
|
||||||
self._really_timeout()
|
self._really_timeout()
|
||||||
@@ -189,14 +189,14 @@ class LeoUI(View):
|
|||||||
This copies View._dispatch_timeout, apart from the `on_timeout` dispatch,
|
This copies View._dispatch_timeout, apart from the `on_timeout` dispatch,
|
||||||
which is now handled by `__dispatch_timeout`.
|
which is now handled by `__dispatch_timeout`.
|
||||||
"""
|
"""
|
||||||
if self._View__stopped.done():
|
if self._BaseView__stopped.done():
|
||||||
return
|
return
|
||||||
|
|
||||||
if self._View__cancel_callback:
|
if self._BaseView__cancel_callback:
|
||||||
self._View__cancel_callback(self)
|
self._BaseView__cancel_callback(self)
|
||||||
self._View__cancel_callback = None
|
self._BaseView__cancel_callback = None
|
||||||
|
|
||||||
self._View__stopped.set_result(True)
|
self._BaseView__stopped.set_result(True)
|
||||||
|
|
||||||
def _dispatch_item(self, *args, **kwargs):
|
def _dispatch_item(self, *args, **kwargs):
|
||||||
"""Extending event dispatch to run in the instantiation context."""
|
"""Extending event dispatch to run in the instantiation context."""
|
||||||
|
|||||||
Reference in New Issue
Block a user