Files
flare/src
Julian Schmidhuber 2887ebd771 fix(backend): Partial fix for messages loading a long time if backend busy
If the backend is busy, e.g. downloading attachments, this would block
the entire backend thread as it cannot handle multiple commands at the
same time (it will directly await on executing the first command, and
only afterwards handle the second one). Fixing this problem is very
difficult as the presage::Manager cannot be sent between threads. One
therefore needs to use tokio::task::LocalSet for the fix, which runs the
futures on the current tokio thread. This still leads to problems though
as many functions in the manager require mutable (and therefore
exclusive) access to the manager. There is no good way to fix it except
for wrapping the manager in a RwLock (I have chosen to use one from
tokio, as using the one in std would likely lead to clippy issues with
hold locks accross await points). This is only a partial fix though, if
some method requires mutable access to the manager, this still blocks
every other method from executing. But it should at least fix the most
serious contenders, like downloading attachments. I don't know a better
fix at this time.

Potentially related to #271.
2025-10-19 16:03:17 +02:00
..
2024-08-06 17:33:29 +02:00
2022-08-07 14:00:01 +02:00