On Tue, Apr 20, 2010 at 10:14 AM, Nick Zitzmann <n...@chronosnet.com> wrote:

>
> 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...
>
>
I did not see such exceptions been thrown, nor any crash....


> 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.
>
>
Doubt it. I am using a secondary hidden webView dedicated to the background
thread. I was not sure if "@synchronized" would help, so I added anyway upon
each access. But it did not make a difference. I feel that if it was caused
by things related to "thread-safe", linking a seperate WebKit might not
help.

- Hao


> Nick Zitzmann
> <http://www.chronosnet.com/>
>
>
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to