Future.with_timeout_msec


Description:

[ CCode ( cname = "dex_future_with_timeout_msec" , has_construct_function = false ) ]
[ Version ( since = "1.2" ) ]
public Future.with_timeout_msec (owned Future future, int msec)

Creates a new [class@Dex.

Future] that resolves or rejects with the same result as future, unless msec milliseconds 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]

msec

number of milliseconds

Returns:

a [class@Dex.Future]