From fbd4463f2097601ecafa0ed926d9640ab818ca40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Basl=C3=A9?= Date: Thu, 15 Dec 2022 15:47:57 +0100 Subject: [PATCH] Fix subsection style in WebFlux Concurrency Model The block title style previously used was not rendered in HTML and the title couldn't be differentiated from the text. Though, it was in the PDF, as italics. Introducing delimited blocks in the open (`--`) style did introduce styling, but the vertical alignment isn't great. This commit turns these block titles to actual (deep) section titles. In the final HTML, at this depth there is no numbering but bold styling is there. The PDF rendering has also been verified to have relevant style. Closes gh-29694 --- framework-docs/src/docs/asciidoc/web/webflux.adoc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/framework-docs/src/docs/asciidoc/web/webflux.adoc b/framework-docs/src/docs/asciidoc/web/webflux.adoc index 658bd73eb02..9cfea9a98c5 100644 --- a/framework-docs/src/docs/asciidoc/web/webflux.adoc +++ b/framework-docs/src/docs/asciidoc/web/webflux.adoc @@ -248,20 +248,22 @@ current thread (and rely on callbacks instead) means that you do not need extra there are no blocking calls to absorb. +==== Invoking a Blocking API -.Invoking a Blocking API What if you do need to use a blocking library? Both Reactor and RxJava provide the `publishOn` operator to continue processing on a different thread. That means there is an easy escape hatch. Keep in mind, however, that blocking APIs are not a good fit for this concurrency model. -.Mutable State +==== Mutable State + In Reactor and RxJava, you declare logic through operators. At runtime, a reactive pipeline is formed where data is processed sequentially, in distinct stages. A key benefit of this is that it frees applications from having to protect mutable state because application code within that pipeline is never invoked concurrently. -.Threading Model +==== Threading Model + What threads should you expect to see on a server running with Spring WebFlux? * On a "`vanilla`" Spring WebFlux server (for example, no data access nor other optional @@ -285,7 +287,8 @@ specific thread pool `Scheduler` strategy. * Data access libraries and other third party dependencies can also create and use threads of their own. -.Configuring +==== Configuring + The Spring Framework does not provide support for starting and stopping <>. To configure the threading model for a server, you need to use server-specific configuration APIs, or, if you use Spring Boot,