<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<font face="Monaco"><small>Thanks very much, Michael :)<br>
</small></font><font face="Monaco"><small>I just now read the link
you show below, I will try it.<br>
<br>
</small><small>You know that, in WebKitGtk, I can use multi
processes with WebProcess,</small><br>
<small>I create some WebKitWebViews in the gtk main loop thread
using</small><br>
<small>webkit_web_context_set_process_model(webkit_web_context_get_default(),WEBKIT_PROCESS_MODEL_MULTIPLE_SECONDARY_PROCESSES)</small><br>
<small>it creates WebProcess as many as WebKitWebView, but the
main loop invoke these WebKitWebViews just one at the same time.<br>
It maybe a little waste of the WebProcess resources :), I want
to use WebKitWebViews as a consumer in the producer-consumer
model.<br>
<br>
Thanks for your reading!<br>
</small></font><br>
<br>
<div class="moz-cite-prefix">On 11/18/2014 10:43 PM, Michael
Catanzaro wrote:<br>
</div>
<blockquote cite="mid:1416321801.2671.5.camel@lumiose-city"
type="cite">
<pre wrap="">On Tue, 2014-11-18 at 17:31 +0800, 刘阳 wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Can anyone figure me out, what should i do next, to get multithreading
use WebKitWebView objects without GUI ?
</pre>
</blockquote>
<pre wrap="">Hi,
GTK+ is not thread safe, so all GTK+ calls must always occur in the main
thread. WebKitWebView is a GtkWidget and accordingly it's only safe to
use from the main thread.
You can use other threads to perform slow operations, then schedule work
to be performed on the main thread with gdk_threads_add_idle() or
gdk_threads_add_timeout() [1].
Hope that helps,
Michael
[1] <a class="moz-txt-link-freetext" href="https://developer.gnome.org/gdk3/stable/gdk3-Threads.html">https://developer.gnome.org/gdk3/stable/gdk3-Threads.html</a>
</pre>
</blockquote>
<br>
</body>
</html>