aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/Async/IAsyncProcess.php
diff options
context:
space:
mode:
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;
+}