Skip to content

dav: rewrite to use try_ methods and libsoup async API

q66 requested to merge q66/gvfs:dav-soup-async-only into master

Since libsoup3 cannot deal with threads, we cannot use the do_ methods which execute in a thread pool. However, we can implement these in an async manner, which will bypass the thread pool and get rid of the issue.

The write methods are left synchronous as they deal with a memory output stream and do not actually call libsoup. Therefore, we do not have to care whether they are threaded or not.

I also took the liberty of rewriting the horrible big mount loop/state machine for better readability so that we can actually properly reason about error cases and when stuff goes wrong. Since it's async now anyway, there was no reason to do anything else.

The multiparse xml stuff currently runs synchronously. I can't think of any decent way to make that async, but it probably should not be a problem.

This MR is probably rough for the time being. I'm posting it for feedback and to let the CI run on it.

Depends on !136 (merged)

Should fix #609 (closed)

Edited by q66

Merge request reports