Some things I have found on the internet to help with my work.
Explain how runloop works:
https://blog.actorsfit.com/a?ID=00350-d7f71c5c-dd43-4e1a-b948-7b481fafdf8d
https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/Multithreading/Introduction/Introduction.html#//apple_ref/doc/uid/10000057i