Multithread

Equo Chromium supports running Chromium in a multi-threaded mode, which allows Chromium to manage its own internal event loop separately from the SWT UI thread. This is useful for features like drag and drop on Linux, improved CPU performance, and the Standalone mode.

To enable this mode, set the system property:

-Dchromium.multi_threaded_message_loop=true

By default, this feature is disabled to maintain compatibility with previous versions.

When to use Multithread

Multi-threaded mode is required in the following situations:

  • For drag and drop support if you’re targeting Linux

  • For running in Standalone mode (no UI toolkit)

  • For performance improvements in how Chromium manages rendering and browser events

In Standalone mode, enabling multithread means you no longer need to explicitly call ChromiumBrowser.startBrowsers(). Normally, this method is required to start the browser event loop and block the main thread until all browser windows are closed. However, with multi-threaded mode enabled, Chromium runs its own internal message loop on a separate thread.

Platform-specific notes

On Windows, starting with version 128.0.9, enabling multithreaded moves browser callbacks from OpenWindowListener and LocationListener off the main SWT UI thread. This design keeps your app responsive by ensuring that any lengthy operations inside those listeners cannot freeze the user interface.

Because these callbacks no longer execute on the UI thread, you must avoid updating SWT widgets directly or invoking syncExec within them. Calling syncExec from a non-UI thread will wait for the UI thread to respond, but since that thread is already busy, it can lead to a deadlock.

Instead, always wrap your UI updates in asyncExec, which schedules them on the UI thread without blocking or risking a standstill in your application.

More information