`ui._remote_ctl`: shield remote rect removals

Since under `trio`-cancellation the `.remove()` is a checkpoint and will
be masked by a taskc AND we **always want to remove the rect** despite
the surrounding teardown conditions.
qt_w_graceful_SIGINT
Tyler Goodlet 2025-09-29 13:26:11 -04:00
parent 0462415491
commit 8bb5c1bf96
1 changed files with 6 additions and 3 deletions

View File

@ -15,8 +15,8 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>. # along with this program. If not, see <https://www.gnu.org/licenses/>.
''' '''
Remote control tasks for sending annotations (and maybe more cmds) Remote control tasks for sending annotations (and maybe more cmds) to
to a chart from some other actor. a chart from some other actor.
''' '''
from __future__ import annotations from __future__ import annotations
@ -32,6 +32,7 @@ from typing import (
) )
import tractor import tractor
import trio
from tractor import trionics from tractor import trionics
from tractor import ( from tractor import (
Portal, Portal,
@ -316,7 +317,9 @@ class AnnotCtl(Struct):
) )
yield aid yield aid
finally: finally:
await self.remove(aid) # async ipc send op
with trio.CancelScope(shield=True):
await self.remove(aid)
async def redraw( async def redraw(
self, self,