Updates to threading code in both COBCoreScheduler and UHCore