I am trying to learn C#! I am most familiar with Java between programming languages! Just now I am trying to understand Task
's! Is there something like Task
in Java?
What are the differences between Task
's and threads? What does Task
offer that threads can not do? Basically why do we need Task
's?
The best alternative is Java. It's not free, so if you're looking for a free alternative, you could try C++ or Rust. Other great apps like C (programming language) are Go (Programming Language), C#, Lua and Perl.
The C programming language has been alive and kicking since 1972, and it still reigns as one of the fundamental building blocks of our software-studded world.
This is why Fortran is often faster than C. This is why numerical libraries are still written in Fortran. However, it comes at the cost of pointer arithmetic.
Many of the more popular C-style languages are object-oriented (C++, Java, C#), but C itself is not. Many of the other big names, such as Python, Perl, PHP, and Ruby also have a C-style influence, although how important that is, and to what degree, depends on who you ask.
I'd say the closest 1:1 class is Future<T>
or CompletableFuture<T>
. CompletableFuture
has some extra chaining methods similar to those in Task<T>
in C#.
Apparently in early versions of the Task Parallel Library (C#) Task<T>
was called Future<T>
(http://www.nedstoyanov.com/promises-and-futures/)
The Fork/Join framework introduced in Java 7 is probably the closest thing:
http://docs.oracle.com/javase/tutorial/essential/concurrency/forkjoin.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With