Skip to content

Commit

Permalink
Documentation fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
amaembo committed Nov 10, 2021
1 parent d347be6 commit 4718a42
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,13 @@

/**
* Indicates that the annotated executor (CoroutineContext, Scheduler)
* allows blocking methods execution.<br><br>
* <p>
* If a given executor does not allow blocking calls, {@link NonBlockingExecutor} should be used.<br><br>
* allows blocking methods execution.
* <p>
* If a given executor does not allow blocking calls, {@link NonBlockingExecutor} should be used.
*
* <p>
* Example 1 (Kotlin coroutines):
* <pre>
* {@code
* <pre>{@code
* class BlockingExampleService {
* val dispatcher: @BlockingExecutor CoroutineContext
* get() { ... }
Expand All @@ -40,12 +39,11 @@
*
* @Blocking fun blockingBuzz() { ... }
* }
* }
* </pre><br>
* }</pre>
*
* <p>
* Example 2 (Java with Reactor framework):
* <pre>
* {@code
* <pre>{@code
* class BlockingExampleService {
* private static final @BlockingExecutor Scheduler blockingScheduler =
* Schedulers.newBoundedElastic(4, 10, "executor");
Expand All @@ -58,9 +56,8 @@
* @Blocking
* private String blockingBuzz(String url) { ... }
* }
* }
* </pre>
* <p>
* }</pre>
*
* @see Blocking
* @see NonBlocking
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,14 @@

/**
* Indicates that the annotated executor (CoroutineContext, Scheduler)
* does not allow blocking methods execution.<br><br>
* <p>
* does not allow blocking methods execution.
*
* If a given executor allows blocking calls, {@link BlockingExecutor} should be used.<br><br>
* <p>
* If a given executor allows blocking calls, {@link BlockingExecutor} should be used.
*
* <p>
* Example 1 (Kotlin coroutines):
* <pre>
* {@code
* <pre>{@code
* class NonBlockingExampleService {
* val dispatcher: @NonBlockingExecutor CoroutineContext
* get() { ... }
Expand All @@ -41,12 +40,11 @@
*
* @Blocking fun blockingBuzz() { ... }
* }
* }
* </pre><br>
* }</pre>
*
* <p>
* Example 2 (Java with Reactor framework):
* <pre>
* {@code
* <pre>{@code
* class NonBlockingExampleService {
* private static final @NonBlockingExecutor Scheduler operationsScheduler =
* Schedulers.newParallel("parallel");
Expand All @@ -59,9 +57,7 @@
* @Blocking
* private String blockingBuzz(String url) { ... }
* }
* }
* </pre>
* <p>
* }</pre>
* @see Blocking
* @see NonBlocking
*/
Expand Down

0 comments on commit 4718a42

Please sign in to comment.