Difference between TFuture.Next() and TFuture.Then()?

I’ve been working on some Async function calls recently and TFuture seem to be the way to go for awaiting a value from another function. I see that TFuture.Get() can be used to block the thread until a value has been set, but I was hoping to use some sort of callback in order to avoid blocking on the main thread. TFuture.Next() and TFuture.Then() both seem like they’re able to accomplish this, but I’m not sure if there’s a difference or if I should use one over the other. The documentation for both seems to be identical:

T Future Base/Then | Unreal Engine 5.4 Documentation | Epic Developer Community (epicgames.com)

T Future Base/Next | Unreal Engine 5.4 Documentation | Epic Developer Community (epicgames.com)

Next() is a convenience function for Then() as stated in the source code. The difference is that the callable for Next() accepts the Future result type instead of the future itself.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.