'Scheduler' is already declared in this scope when building for board = adafruit_feather_nrf52840
When I build for adafruit_feather_nrf52840 there is a conflict with the declaration SchedulerRTOS Scheduler in rtos.h.
I tried to wrap CopyThreads classes in their own namespace without being able to override the default.
If this issue is interesting, I can help with a solution.
Thanks for trying CopyThread on nrf52840!
I would not use two different Schedulers at the same time (SchedulerRTOS and CthClass). As far as i know, Arduino expect at most one Singelton instance of Scheduler and the instantiation is outside of CopyThread. You might want to try only the C part of CopyThread without the Arduino adapter in Cth.h.
Thanks for your answer. For whatever reason when compiling for ESP32 the error doesn't show up, probably due to a different #include order. I will play with the C version, thanks!