Re: WebDownloadDelegate delegate methods called on non-main thread
Re: WebDownloadDelegate delegate methods called on non-main thread
- Subject: Re: WebDownloadDelegate delegate methods called on non-main thread
- From: Jens Alfke <email@hidden>
- Date: Mon, 29 Oct 2018 16:30:32 -0700
> On Oct 29, 2018, at 3:34 PM, Nick Beadman <email@hidden>
> wrote:
>
> When using the older WebView API to build a simple application that can
> download files the thread that the WebDownloadDelegate methods are called on
> changed between AppleWebKit/604.5.6 and AppleWebKit/605.1.15. I have
> confirmed that the issue still occurs with r237410.
Forwarding a callback from one thread/queue to another is simple, so this is
easy enough to work around. Is it causing significant trouble for your code?
I doubt Apple will fix this, since the old behavior was (IMO) bad — callbacks
on the main thread can hurt app responsiveness. A good API will either allow
the client to specify a thread/queue for callbacks, or just make callbacks on
an unspecified thread and put the caller in charge of handling thread-safety.
(The first approach is safer, the second faster.)
—Jens
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden