python-trio / trimeter

(not ready yet) A simple but powerful job scheduler for Trio programs
https://trimeter.readthedocs.io
Other
63 stars 3 forks source link

Can we give tasks meaningful names for debugging? #4

Open njsmith opened 6 years ago

njsmith commented 6 years ago

Right now they're all named worker, which is pretty useless.

In run_on_each, we could easily name them like f"{async_fn.__name__} #{index}", which seems reasonable.

But that wouldn't help run_all, where you really want to pass down each individual callable's name somehow... maybe run_on_each should have an option to explicitly override the names?

Though probably we need to figure out what the actual public APIs are (#3) before worrying about this too much.