You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The library provides an implementation of the [CompletionStage](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletionStage.html) interface and related classes these are designed to support long-running blocking tasks (typically, I/O bound). This functionality augments the sole Java 8 built-in implementation, [CompletableFuture](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html), that is primarily supports computational tasks. Also, the library helps with numerous asynchronous programing challenges like handling timeouts, retry/poll functionality, orchestrating results of multiple concurrent computations and similar.
4
4
@@ -12,7 +12,7 @@ New name:
12
12
<dependency>
13
13
<groupId>net.tascalate</groupId>
14
14
<artifactId>net.tascalate.concurrent</artifactId>
15
-
<version>0.8.2</version>
15
+
<version>0.8.3</version>
16
16
</dependency>
17
17
```
18
18
Old Name
@@ -40,7 +40,7 @@ To use a library you have to add a single Maven dependency
40
40
<dependency>
41
41
<groupId>net.tascalate</groupId>
42
42
<artifactId>net.tascalate.concurrent</artifactId>
43
-
<version>0.8.2</version>
43
+
<version>0.8.3</version>
44
44
</dependency>
45
45
```
46
46
# What is inside?
@@ -538,7 +538,7 @@ Ah, those dreaded `TreadLocal`-s we all hate, love to hate, but, neveretheless,
538
538
539
539
Typically, we spawn asynchronous code from some thread with well-known characteristics, like HTTP request thread. Here we can easly access contextual information from thread-local variables. However, using thread-local variables from asynchronous code block is hard while it's impossible to predict what thread from the pool will execute the code. It's necessary to capture the context of the one thread and propagate it to threads executing asynchronous code.
540
540
541
-
To solve this issue, there Tascalate Concurrent provides `ContextVar` class, that serves as a proxy over thread-local variable for multi-threaded code. Typical usage scenario is the following:
541
+
To solve this issue, there Tascalate Concurrent provides `ContextVar` class (since version 0.8.1), that serves as a proxy over thread-local variable for multi-threaded code. Typical usage scenario is the following:
542
542
543
543
1. Define `ContextualPromiseFactory` holding `ContextVar`-s from existing thread-local variables.
544
544
2. Capture a context of the thread that spawns asynchronous operations.
0 commit comments