JanetDocsSourcePlaygroundI'm feeling luckyCommunityGitHub sign in

ev/deadline

core-api


    cfunction
    src/core/ev.c on line 3197, column 1

    (ev/deadline sec &opt tocancel tocheck intr?)

    Schedules the event loop to try to cancel the `tocancel` task as 
    with `ev/cancel`. After `sec` seconds, the event loop will attempt 
    cancellation of `tocancel` if the `tocheck` fiber is resumable. 
    `sec` is a number that can have a fractional part. `tocancel` 
    defaults to `(fiber/root)`, but if specified, must be a task (root 
    fiber). `tocheck` defaults to `(fiber/current)`, but if specified, 
    must be a fiber. Returns `tocancel` immediately. If `interrupt?` is 
    set to true, will create a background thread to try to interrupt 
    the VM if the timeout expires.


0 examplesSign in to add an example
Loading...