W3cubDocs

/PyTorch 2.9

torch.jit.wait

torch.jit.wait(future) [source]

Force completion of a torch.jit.Future[T] asynchronous task, returning the result of the task.

See fork() for docs and examples. :param future: an asynchronous task reference, created through torch.jit.fork :type future: torch.jit.Future[T]

Returns

the return value of the completed task

Return type

T

© 2025, PyTorch Contributors
PyTorch has a BSD-style license, as found in the LICENSE file.
https://docs.pytorch.org/docs/2.9/generated/torch.jit.wait.html