Skip to main content

Threading and UI

The core works on IO threads and the thread pool. It does not assume WinForms, WPF, or any specific UI framework.

  • DataReceived and StateChanged may fire on non-UI threads.
  • Switch to the UI thread before updating controls.
  • Prefer Zeus presentation adapters instead of writing Invoke or Dispatcher.Invoke in every window.
  • Avoid long blocking work inside event callbacks.
AssemblyThread handoffCommon APIs
Zeus.Presentation.WinFormsControl.BeginInvokeAttachZeus, BindTo, BindEnabled
Zeus.Presentation.WpfDispatcher.BeginInvokeAttachZeus, BindTo, BindEnabled, AsBindingSource
Zeus.Presentation.AbstractionsIUiDispatcherImmediateUiDispatcher for tests

The core packages and Zeus.Presentation.Abstractions do not reference desktop frameworks.

If you must subscribe manually, use BeginInvoke in WinForms and the WPF Dispatcher in WPF. Do not update controls after their window has closed.