Platform-specific threading requirements
devThe placement of the tray icon creation and the requirement for an event loop depend on the platform:
- Windows & Linux/FreeBSD: An event loop (Win32 on Windows, GTK on Linux/FreeBSD) must be running on the thread. You must create the tray icon on the same thread as the event loop. It does not have to be the main thread.
- macOS: An event loop must be running on the main thread, so you must also create the tray icon on the main thread.