static Future<int> getNumberOfCores() async { try { return _numberOfCores; } on PlatformException catch (e) { throw 'Failed to retrieve number of cores ${e.code}: ${e.message}'; } }