aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/Async/IAsyncProcess.php
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2025-04-28 19:57:56 -0100
committerMaxence Lange <maxence@artificial-owl.com>2025-04-28 19:58:06 -0100
commit6d272ff894fa969e5a526caf6a91d60eda115c53 (patch)
treedf90f826a29f7169dd9b550f2e478a1b09d29e71 /lib/public/Async/IAsyncProcess.php
parent10a01423ecfc7e028960eee8058bd177ad28d484 (diff)
downloadnextcloud-server-enh/noid/async-process-run.tar.gz
nextcloud-server-enh/noid/async-process-run.zip
feat(async): AsyncProcessenh/noid/async-process-run
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'lib/public/Async/IAsyncProcess.php')
-rw-r--r--lib/public/Async/IAsyncProcess.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/public/Async/IAsyncProcess.php b/lib/public/Async/IAsyncProcess.php
new file mode 100644
index 00000000000..9e32178a1cf
--- /dev/null
+++ b/lib/public/Async/IAsyncProcess.php
@@ -0,0 +1,20 @@
+<?php
+
+/**
+ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+namespace OCP\Async;
+
+use OC\Async\IBlockInterface;
+use OCP\Async\Enum\ProcessExecutionTime;
+
+interface IAsyncProcess {
+ public function exec(\Closure $closure, ...$params): IBlockInterface;
+
+ public function invoke(callable $obj, ...$params): IBlockInterface;
+
+ public function call(string $class, ...$params): IBlockInterface;
+
+ public function async(ProcessExecutionTime $time = ProcessExecutionTime::NOW): string;
+}