Quick Start
Dependencies: .NETStandart 2.0
SetUp
Let's look at one case. We want to create some threads and make the general context for all of them.
Step 1: Include Vostok.Context
library in project:
Step 2: Create FlowingContext
in the Main
void:
Step 3: Create DisplayData
. This void writes thread's number and data from FlowingContext
to the Console:
Step 4: Additionally, write the async task Work
. With it process some threads:
Step 5: Call the Work
from Main:
Result:
Even though the threads were different, context was same.
First usage
Last updated
Was this helpful?