deltachat-core-rust
deltachat-core-rust copied to clipboard
tokio console support for core and repl tool
attached to repl tool:
attached to dc-desktop:
- [x] add tokio console support to repl tool
- [x] create a readme for the repl tool
- [x] name tasks in repl tool and in core
- [x] add console-subscriber to the deltachat-rpc-server, this allows debugging in desktop and bots that use the rpc server.
- [x] Label
Handle::current().spawn_blockingtasks after I know why it usesHandle::current().spawn_blockinginstead of justtokio::task::spawn_blocking - [x] Figure out how to address
cargo denyreport
The named tasks are useful also in other projects that depend on deltachat core, like bots written in rust.
I'm not sure whether there is a benefit of adding a new cargo feature to conditionally depend on console-subscriber.
I think the tokio_unstable rustflag is enough of a toggle switch.
successor of #4418
I haven't thought much about naming conventions for the tasks yet, currently is is rather inconsistent in some places.
I prefixed the tasks for the REPL with repl::, but haven't done so for core, maybe dc:: could be a good prefix?
Things to consider:
- unless you have a wide terminal only first chars of name are shown in the table view.
- there is a column with source location, so maybe name doesn't need full location info?
- should tasks have "loop" in their name?
Let's move this to project resurrection for now. It is possible to rebase and fix conflicts later as most conflicts are about imports, but this can be done when someone actually has a need for this e.g. for debugging something (like iroh, afaik they actually use it because iroh spawns a lot of tasks, while in the core we only have a few loops).