Interrupting a system task

Hello,

I would like to ask what exactly happens when a system task is interrupted and whether there are differences in the process of the interruption of the various implementations.

More specifically:
When I interrupt a service task which, as part of its implementation, persists data to a database, may I expect that the data will, in fact, NOT be persisted because of the interruption?
And if i have two planned transaction as part of the service and the interruption happens somewhere in between, surely i can not expect a rollback of my first transaction?
Additionally: is it even possible to interrupt a service task that is being resolved by an external service worker?

Or is all of this maybe completely “not best practice”?

This seems like an important topic to me, but i was not able to find documentation regarding it. I would be really grateful if anyone could point me in the right direction or explain the mechanics surrounding this.

Many thanks in advance,
BenF