Skip to content

refactor: change to worker pattern for all platforms#2644

Merged
Danielku15 merged 11 commits intodevelopfrom
feature/worker-platform
Apr 8, 2026
Merged

refactor: change to worker pattern for all platforms#2644
Danielku15 merged 11 commits intodevelopfrom
feature/worker-platform

Conversation

@Danielku15
Copy link
Copy Markdown
Member

@Danielku15 Danielku15 commented Apr 8, 2026

Issues

Fixes #2615, #2616, #2617, #2621, #2629

Proposed changes

The threading model of the .net and Android version were quite different to the single-thread nature of JavaScript (+1 thread per worker).

This can lead to race-conditions and concurrent modifications in the .net and Android threading model.

This PR refactors quite some parts there:

  • We share now more code with the web version and only re-implement the worker threading model in .net and Android.
  • We try to stick to a clean "main" (UI) and single thread per "worker" model.
  • Skia was wrongly configured to be worker-incompatible causing rendering to be done in the UI thread.
  • Some further fixes around cursor handling and state handling for .net and android should make things more safe.

Checklist

  • I consent that this change becomes part of alphaTab under it's current or any future open source license
  • Changes are implemented
  • New tests were added (manual tests done, no API/control level automatic tests yet)

Further details

  • This is a breaking change
  • This change will require update of the documentation/website

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment