Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add a timeout function #18

@rcardin

Description

@rcardin

Reuse the raceFirst function to implement a timeout function.

def timeout[A](duration: Duration)(block: Suspend ?=> A): A

The function should throw a scala.concurrent.TimeoutException if the timeout is reached.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions