Carmack wrote a really interesting .plan about this. It seems to be written between Q2 and Q3A, and cites the Windows message queue as a big inspiration:
https://github.com/ESWAT/john-carmack-plan-archive/blob/mast...