blocking call

A call that makes the current thread wait, doing nothing else, until some result or event arrives.

In more detail

Future.get, CompletableFuture.join, database queries and network requests all block. Blocking a request thread holds it hostage; blocking inside a pool that must run the very task you wait for can deadlock. Block only where waiting is safe and bounded by a timeout.

Related terms

Taught in

References