This extension allows plugins to schedule work that must be performed in another thread. Plugins can use this interface to safely perform work that is not real-time safe, and receive the result in the run context. The details of threading are managed by the host, allowing plugins to be simple and portable while using resources more efficiently.
This interface is designed to gracefully support single-threaded synchronous
execution, which allows the same code to work with sample accuracy for offline
rendering. For example, a sampler plugin may schedule a sample to be loaded
from disk in another thread. During live execution, the host will call the
plugin's work method from another thread, and deliver the result to the audio
thread when it is finished. However, during offline export, the
scheduled
load would be executed immediately in the same thread. This
enables reproducible offline rendering, where any changes affect the output
immediately regardless of how long the work takes to execute.