liveBook · Manning

Thread

As explained in Spring Start Here, Second Edition

A thread is an independently schedulable execution unit that runs instructions within an application process.

A thread is an execution unit that runs instructions within an application process. In a nonreactive request flow, one thread executes the flow’s tasks in sequence and waits when a task—such as a service call—has not finished. section 11.4

Calculating a customer’s debt

A banking app checks for external credit, gets internal debt, and calls an external service if needed. In a sequential flow, the request’s thread waits for each service call before continuing and summing the debts. section 11.4

Figure 11.7 The execution of the scenario functionality from the thread point of view. The arrow represents the timeline of the thread. Some of the steps cause details to block the thread, which needs to wait for the task to finish before proceeding.

The timeline shows where a request thread pauses while waiting for a task to finish. section 11.4

How Spring Start Here, Second Edition covers it

How deep it goes
Explains request-level execution, sequential tasks, and I/O waits without detailing lower-level scheduling internals.
Examples
Uses a banking debt calculation involving internal and external service calls before summing balances.
What you can do after
Evaluate whether a sequential request flow leaves its thread blocked while waiting on service I/O.
How it connects
Connects threads with reactive programming, I/O operations, REST calls, and Spring WebClient.

Also explained in

Compare how 17 books explain thread →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Spring Start Here, Second Edition. The section links point to the parts of the book it draws on.