Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/denops_std/function/nvim/mod.ts>jobwait

📚 Standard module for denops.vim
Go to Latest
function jobwait
import { jobwait } from "https://deno.land/x/denops_std@v3.6.0/function/nvim/mod.ts";

Waits for jobs and their |on_exit| handlers to complete. {jobs} is a List of |job-id|s to wait for. {timeout} is the maximum waiting time in milliseconds, -1 means forever. Timeout of 0 can be used to check the status of a job: let running = jobwait([{job-id}], 0)[0] == -1 During jobwait() callbacks for jobs not in the {jobs} list may be invoked. The screen will not redraw unless |:redraw| is invoked by a callback. Returns a list of len({jobs}) integers, where each integer is the status of the corresponding job: Exit-code, if the job exited -1 if the timeout was exceeded -2 if the job was interrupted (by |CTRL-C|) -3 if the job-id is invalid

Parameters

denops: Denops
jobs: unknown
optional
timeout: unknown

Returns

Promise<unknown>