migrated the apps to processes

This commit is contained in:
2023-04-14 00:19:49 +02:00
parent 747bde4aa6
commit bd3402fc39
8 changed files with 149 additions and 203 deletions

View File

@@ -1,21 +1,16 @@
package bin;
import lib.cli.TermHandle;
import lib.cli.CLIApp;
import kernel.ps.ProcessHandle;
import kernel.ps.Process;
using tink.CoreApi;
class HelloWorld extends CLIApp {
class HelloWorld implements Process {
public function new() {}
public function invoke(handle: TermHandle):Future<Bool> {
var world:String = "world";
if (handle.args.length > 0) {
world = handle.args[0];
}
handle.write('Hello, $world!');
return Future.sync(true);
public function run(handle:ProcessHandle) {
handle.write("Hello World!");
handle.close();
}
}