You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.
When I create GCDWebServerStreamedResponse with asyncStreamBlock I end up with multiple threads simultaneously calling my handler. This is a bad scenario for me, since I want to process data and stream it sequentially (i.e. the order is important). This means I have to use NSLock or synchronise via single-threaded DispatchQueue which is far from an efficient implementation I would expect to achieve.
The ideal API would guarantee that my handler isn't called simultaneously in multiple threads. Alternatively I would like to use a synchronous streaming, when the request handler is called only once allowing me to call GCDWebServerBodyReaderCompletionBlock for multiple times, so I would call it in a loop while processing my data.
Can you clarify the way I should use GCDWebServer in my case?
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When I create
GCDWebServerStreamedResponse
withasyncStreamBlock
I end up with multiple threads simultaneously calling my handler. This is a bad scenario for me, since I want to process data and stream it sequentially (i.e. the order is important). This means I have to useNSLock
or synchronise via single-threadedDispatchQueue
which is far from an efficient implementation I would expect to achieve.The ideal API would guarantee that my handler isn't called simultaneously in multiple threads. Alternatively I would like to use a synchronous streaming, when the request handler is called only once allowing me to call
GCDWebServerBodyReaderCompletionBlock
for multiple times, so I would call it in a loop while processing my data.Can you clarify the way I should use
GCDWebServer
in my case?The text was updated successfully, but these errors were encountered: