qkzk / fm

dired/ranger like file manager
Other
16 stars 0 forks source link

tokio for async previews #98

Closed qkzk closed 2 weeks ago

qkzk commented 1 month ago

v0.1.30 aims to build previews in a separate threads, avoiding to block navigation while building them.

It works with a separate thread running constantly and 2 mpsc (build request -> and preview result <-). It's inefficient to have 2 threads just for that.

  1. Is there a way to achieve the same goal with tokio ?
  2. Could we use the tokio task scheduler to stop the preview building if we navigate quickly and only run the last one ?
qkzk commented 2 weeks ago

Abandoned tokio, did it with threads and a mutex in v0.1.32