[webkit-help] WebKit2's thread-safety
Adam Roben
aroben at apple.com
Wed Mar 23 12:00:28 PDT 2011
On Mar 23, 2011, at 2:53 PM, Nick Guenther wrote:
> For the project I'm working on I'm running WebKit2 on Windows. I have it spinning up fine, but if I spin up multiple WebKit windows on multiple GUI threads I get alternately segfaults, null returns from WKContextCreate(), and sometimes everything working fine *except right click*. Windows supports having an arbitrary number of message loops running at once, and if I comment out the calls that instantiate webkit windows into my host windows the host windows run fine, so I'm looking to thread-safety in WebKit2 as the culprit. Does it exist?
>
> I found http://webkit.sed.hu/blog/20110120/webkit2-memory-consumption-process-models-vol-1 which seems to imply that indeed, no, WebKit2 is meant to be run on one gui thread at a time (at least, within a single process), but if I could get a clear pointer to somewhere that says NO THIS IS NOT POSSIBLE my life would be simplified ever so much.
WebKit2's API is only meant to be used from a single thread. It seems quite likely that your problems are due to making WebKit2 API calls from multiple threads.
-Adam
More information about the webkit-help
mailing list