Future.with_timeout


Description:

[ CCode ( cname = "dex_future_with_timeout" , has_construct_function = false ) ]
[ Version ( since = "1.2" ) ]
public Future.with_timeout (owned Future future, int64 usec)

Creates a new [class@Dex.

Future] that resolves or rejects with the same result as future, unless usec microseconds elapses first. If the timeout elapses first, the returned future rejects with dex_error_timed_out and discards future .

Parameters:

future

a [class@Dex.Future]

usec

number of microseconds

Returns:

a [class@Dex.Future]