Multiple changes

- Backporting and minor fixups in the Spectra advanced example.
- Fixed build problems with the Spectra example on Windows.
- Updated the multithreading-related classes used in the examples.