Each thread has a bit set called awakeIslandBitSet. Each bit corresponds the awake island index.
Before the solve, this bitset is all zeros.
When bodies are finalized, every body that is not sleepy will turn on the corresponding awakeIslandBitSet for the owning island.
So this island cannot sleep.
On the other hand, if this body is sleepy and it is the sleepiest body, then it will make the owning island a candidate for splitting if the island has removed constraints.
This is the related code: