SettableFuture appears to be analogous to a TaskCompletionSource
and its Task
. Task already has ContinueWith
which should give you the functionality of ListenableFuture.
What is the C# equivalant of Java's SettableFuture and ListenableFuture?
Pergunta
I'm porting Java code that uses the concurrent Guava library to C#. I came across many uses of SettableFuture
and ListenableFuture
.
Is there a C# class that comes very close to this pattern? Or do there exist C# wrappers for it? Because I want to change the flow of the code as less as possible.
Solução
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow