Re: SoupServer - understanding multiple request at once handling



On 08/17/2013 04:16 PM, Bernhard Schuster wrote:
The trick is to call `soup_message_pause`, put all info needed to
process it further into a struct, pass that as `user_data` to a
`GThread` or `pthread`, resume message processing in that thread by
`soup_message_unpause`. Just recently did that, works like a charm.

You should not use a thread; SoupServer is not thread-safe. It's
designed to be used asynchronously if you want to be able to process
multiple signals at once; so rather than using another thread, use some
sort of callback from the GMainLoop.

-- Dan



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]