[pbs-devel] [RFC PATCH proxmox-backup 2/2] server/state: add spawn_internal_task and use it for websockets

Dominik Csapak d.csapak at proxmox.com
Fri Jul 24 09:35:41 CEST 2020


On 7/24/20 9:29 AM, Dietmar Maurer wrote:
>> is a helper to spawn an internal tokio task without it showing up
>> in the task list
> 
> Can't we use a normal worker task?
> 

we could, but as i wrote in the mail, we'd either have

* 2 visible WorkerTasks per terminal connection (one for the process, 
one for the websocket) -> this would be confusing for users..

* would have to make some workertasks invisible somehow (no upid? how to 
keep track of it then) -> much work for little gain?

* we would have to refactor the whole terminal handling with termproxy,
so that in only gets started during the websocket connection
-> this is a non-trivial refactoring and would also have to be done on
pve/pmg since they all share some code (at least the gui, which
also has to be aware of some of this)

so i think a small wrapper around tokio::spawn is not so bad





More information about the pbs-devel mailing list