Blocking or Non-Blocking

Trần Thiện Khiêm
3 min readMar 17, 2022

that’s a question

Have you heard of Non-Blocking APIs, what it is and why we should consider using it? If you haven’t known yet, this is the post for you.

Blocking vs Non-Blocking

Back in previous century (20th century), every C developer should know this function.

int getchar();

This function reads a character from std in (it’s the keyboard back then). So if you want to write a simple game using the keyboard as the controller, this maybe a useful function to use.

--

--

Trần Thiện Khiêm

Software Engineer at Facebook — a coder, a dreamer and a Dota 2 Herald.