thread<T> function

Future<T> thread<T>(
  1. FutureOr<T> action()
)

Implementation

Future<T> thread<T>(FutureOr<T> Function() action){
  return compute<void, T>((_){
    return action();
  }, null);
}