Spawning futures as an alternative to multithreading
I see some things that may help you improve your code.

Simplify your code using literals

There is nothing intrinsically wrong with std::chrono::milliseconds(0) but I would prefer to read (and to write) 0ms instead.  This can be done by adding this line to within main:

using namespace std::literals::chrono_literals;


Use more meaningful variable names

I understand that it's just a toy program, but I really think we can do better than varI and varJ!  Since it's just a freerunning counter, why not just call it count?

Understand the threading model

It's important to realize that std::future was designed to hold not only the future value (or exception) but also a flag for the future_status.  This renders the current code's flag unnecessary.  Here's a more concise rewrite of main:

int main()
{
    using namespace std::literals::chrono_literals;
    int count = 0;
    std::future&lt;int&gt; future = std::async(std::launch::async, thread, count);
    while(1) {
        if (future.wait_for(0ms) == std::future_status::ready) {
            std::cout &lt;&lt; "\t result is " &lt;&lt; future.get() &lt;&lt; '\n';
            future = std::async(std::launch::async, thread, count);
        }
        ++count;
    }
}


Beware of sharing unsynchronized variables

Right now, both the thread running main and the thread running the function write to std::cout.  The way the code is currently structured (both in the original and in the rewrite above), they do not contend for that same variable but they could because there currently is no synchronization.  The effect is that the output of the two threads could easily be interleaved.  The easiest way to prevent this is to only access cout from a single thread.