A good question, unfortunately, I do not think that this is possible for two main reasons.
Reason 1
You do not have such low-level access in iOS.
The OS is the one who decides which thread runs on the kernel. It also has the ability to turn the kernel on and off depending on several conditions that go beyond the scope of your application.
eg. When in Grand Central Dispatch you write
DispatchQueue.global(qos: .background).async { }
You have no guarantee that the closure will be performed on another core.
Reason 2
Starting a SpriteKit startup loop does a ton of things
- trigger update
- evaluates actions
- imitates physics
- applies restrictions
Your idea involves the following steps in the call update phase
- moving in the background thread
- perform some heavy calculations
- return the result to the main thread
But at the moment, you have no guarantee that the Run Game loop is still in the call update phase. It may be in evaluates actions , or it may even work in the next frame. On the other hand, no more than 16 milliseconds is required for each frame.
Possible Solution
Instead of targeting another CPU core, you can take full advantage of the 64 bits allowed by the current core. Check out this Q / A about SceneKit for the benefits of SIMD.
source share