A callback will not help at all, if there exists a mixture of short and long operations. Long operations would still prevent handling secondary (short) requests, which could be served (almost) instantly.
So
soup_message_unpause (...)
soup_message_set_status (...)
soup_message_set_response (...)
are required to be the only ones modifing the session/message (which seems to work).
How is the below supposed to be implemented? According to the API doc (stable) everything is being processed in one and the same GMainContext, correct me if I am wrong.
Below the conceptual implementation with threads, which does contain potential races.