Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] linux-gtk low level synchronization


Only one thread is allowed in X windows.  Graphics operations can happen in every thread and therefore need to be synchronized with the UI thread.  On Windows, GDI allows more than one thread so no lock is necessary.



"Frank Benoit" <keinfarbton@xxxxxxxxxxxxxx>
Sent by: platform-swt-dev-bounces@xxxxxxxxxxx

08/12/2008 05:32 AM

Please respond to
"Eclipse Platform SWT component developers list."        <platform-swt-dev@xxxxxxxxxxx>

To
platform-swt-dev@xxxxxxxxxxx
cc
Subject
[platform-swt-dev] linux-gtk low level synchronization





In linux-gtk-x86, org.eclipse.swt.internal.gtk.OS _all_ native calls to GTK are surrounded by a synchronization.

lock.lock();
try{
  _gtk_tree_model_get_path(tree_model, iter);
} finally {
 lock.unlock();
}

On win32-x86 this is not the case. The win API functions are called directly.

Now i wonder why this is the case. SWT already checks for only be called in the GUI thread.
Why is this synchronization in all low level calls necessary?
Isn't this a very huge performance hit?
_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev


Back to the top