Category Archives: Без рубрики

Js. myPromiseAll

Promise.all is all or nothing, it returns promise if all incoming promises resolved chain version, not correct version below doesn’t work properly lets test lets reject some incoming promise

Posted in Без рубрики | Leave a comment

C#.Rihter.Timer

simple example, task will be created periodically and will be handled in thread pool with Thread.QueueUserWorkItem output

Posted in Без рубрики | Leave a comment

С#.Rihter.ParallelLINQ

simple example output

Posted in Без рубрики | Leave a comment

C#.Rihter.Parallel For, ForEach, Invoke

tasks that can be done in parallel output Or the same with parallel Or the same with invoke output PARALLEL WITH INIT BODY FINISH LAMDAS One good example from stackOverflow more info on msdn more info on stackOverFlow

Posted in Без рубрики | Leave a comment

C#.Rihter.TaskStatus

output is

Posted in Без рубрики | Leave a comment

C#.Rihter.ParentTasks and TaskFactory

Example output TASK FACTORY

Posted in Без рубрики | Leave a comment

C#.Rihter.ContinueWith

output

Posted in Без рубрики | Leave a comment

C#.Rihter.Task

task allows get result this is the way how we can cancel and handle the exception

Posted in Без рубрики | Leave a comment

C#.Rihter. How to stop thread work ? Cancellation token

how do i exit from thread static void Main(string[] args) { var tokenSource1 = new CancellationTokenSource(); var token1 = tokenSource1.Token; var tokenSource2 = new CancellationTokenSource(); var token2 = tokenSource2.Token; var linkedTokenSource = CancellationTokenSource.CreateLinkedTokenSource(token1, token2); tokenSource1.Cancel(); // adding actions on cancel … Continue reading

Posted in Без рубрики | Leave a comment

C#. Rihter. Use Thread from the thread pool

Result

Posted in Без рубрики | Leave a comment