Re: NSOperation and WebView
Re: NSOperation and WebView
- Subject: Re: NSOperation and WebView
- From: Nick Zitzmann <email@hidden>
- Date: Tue, 20 Apr 2010 11:14:05 -0600
On Apr 18, 2010, at 4:36 PM, Hao Lü wrote:
> I am doing some analyzing work on a WebView (going through the DOM, checking
> links and texts). Since, sometimes this blocks the GUI, I am experimenting
> using NSOperation/NSInvocationOperation. What confuses me is that, my
> operation stops (not sure if it sleeps or is terminated) upon accessing the
> DOMDocument. There is no message shown in the console.
>
> Any clues?
WebKit is not thread-safe, and a lot of WebKit classes will even throw exceptions if you try creating or accessing them in background threads. So what you observed doesn't surprise me too much...
Of course, if you really want to know what's going on, then you can try downloading the WebKit source from <http://webkit.org/> and building your application against an open-source build of WebKit rather than the system's build.
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden