Basic start for yielding. At the moment it's having some trouble managing multiple threads, but the basic mechanics are there