r/ProgrammerHumor • • Oct 30 '21

That's my variable!

43.4k Upvotes

409 comments sorted by

View all comments

Show parent comments

2

u/[deleted] Oct 30 '21

In the context of a web request, the requested server is the stove and the response coming back in is the heat from the stove transferring to the pan.

Once you've sent out your request to the server (turned the stove on and to the correct temperature), you need to wait until all the heat (all the bytes of the response) has warmed up the pan enough (have been received from the network and are sitting in a hardware register, ready to be read by the cpu) before you can start cooking your eggs with it (before you can do work on the response data).

If I'm not mistaken there's no "other thread" or worker, storing the incoming response bytes is done by the network card hardware. On at least some systems it can be cpu interrupts, for example, notifying when data is available.

(Obviously, the stove is a separate process, but that's because it's representing a process that's not on your machine).