Would you happen to have some code online I can look at which use this technique ?
I first saw Casey Muratori from <a href="https:&#x2F;&#x2F;handmadehero.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;handmadehero.org&#x2F;</a> use an approach like this and used the same approach in a small project of mine. It worked well and was simple enough to implement.