opt.: multi process

This commit is contained in:
lollipopkit
2024-01-21 15:30:50 +08:00
parent 50bcabbc54
commit e57b63a76f
10 changed files with 35 additions and 14 deletions

View File

@@ -1,5 +1,6 @@
import 'dart:async';
import 'package:computer/computer.dart';
import 'package:dartssh2/dartssh2.dart';
import 'package:flutter/foundation.dart';
import 'package:toolbox/data/model/app/error.dart';
@@ -120,6 +121,6 @@ Future<SSHClient> genClient(
return SSHClient(
socket,
username: spi.user,
identities: await compute(loadIndentity, privateKey),
identities: await Computer.shared.start(loadIndentity, privateKey),
);
}