changing doc format and HTML literals
This commit is contained in:
+11
-6
@@ -6,12 +6,17 @@ key : string uniquely identifying the task
|
||||
exec_func : function to execute
|
||||
return value : the process ID of the started (or still running) task
|
||||
|
||||
:desc
|
||||
task() starts the 'exec_func' in a new process and returns that process' ID. If a process with the same 'key' is already running, task will not start a new process but instead just return the PID of the process that is already running.
|
||||
|
||||
:see
|
||||
>task
|
||||
|
||||
:related
|
||||
**PHP:** Background-process patterns using `proc_open()`, queues, cron, or worker supervisors
|
||||
**JavaScript / Node.js:** Node `child_process`, worker queues, timers, schedulers, and supervised background jobs
|
||||
:content
|
||||
Starts `exec_func` in a new process and returns that process ID.
|
||||
|
||||
If a process with the same `key` is already running, `task()` does not start a second copy. Instead it returns the PID of the already-running task.
|
||||
|
||||
Use the `key` to make a background job idempotent across repeated calls.
|
||||
|
||||
Related:
|
||||
|
||||
- PHP: background-process patterns using `proc_open()`, queues, cron, or worker supervisors
|
||||
- JavaScript / Node.js: Node `child_process`, worker queues, timers, schedulers, and supervised background jobs
|
||||
|
||||
Reference in New Issue
Block a user