Tag: thread pool

Prime Number Generator (6n + 1 or 6n – 1)

Prime Number Generator (6n + 1 or 6n - 1) This generator is like most where it brute forces an integer: it see whether the integer is divisible by any of the primes; if so, then it's not a prime and vice versa. This though only compares values 6n + 1 and 6n - 1 starting with n as 1 as … Continue reading Prime Number Generator (6n + 1 or 6n – 1)

Advertisements

Asynchronous programming in Scala with Future

What is Future? A future object is an object whose value will be removed at some point in the future. This value is usually the result of a calculation process. This calculation returns the result value, we say that the Future object has completed that value, and vice versa. If an Exception is returned, the … Continue reading Asynchronous programming in Scala with Future