You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Provides primitives for flow control to be used in async functions
533
-
534
-
535
-
An event can signal to multiple listeners to resume execution
536
-
The event can be set from a non-async context.
537
-
*dapui.async.control.Event*
538
-
Fields~
539
-
{set} `(fun(max_woken?: integer): nil)` Set the event and signal to all (or limited number of) listeners that the event has occurred. If max_woken is provided and there are more listeners then the event is cleared immediately
540
-
{wait} `(async fun(): nil)` Wait for the event to occur, returning immediately if
541
-
already set
542
-
{clear} `(fun(): nil)` Clear the event
543
-
{is_set} `(fun(): boolean)` Returns true if the event is set
544
-
545
-
*dapui.async.control.event()*
546
-
`event`()
547
-
548
-
Create a new event
549
-
Return~
550
-
`(dapui.async.control.Event)`
551
-
552
-
553
-
An future represents a value that will be available in the future.
554
-
The future result can be set from a non-async context.
555
-
*dapui.async.control.Future*
556
-
Fields~
557
-
{set} `(fun(value): nil)` Set the future value and wake all waiters.
558
-
{set_error} `(fun(message): nil)` Set the error for this future to raise to
559
-
waiters
560
-
{wait} `(async fun(): any)` Wait for the value to be set, returning immediately if already set
561
-
562
-
*dapui.async.control.future()*
563
-
`future`()
564
-
565
-
Create a new future
566
-
Return~
567
-
`(dapui.async.control.Future)`
568
-
569
-
570
-
A FIFO queue with async support.
571
-
*dapui.async.control.Queue*
572
-
Fields~
573
-
{size} `(fun(): number)` Returns the number of items in the queue
574
-
{max_size} `(fun(): number|nil)` Returns the maximum number of items in the queue
575
-
{get} `(async fun(): any)` Get a value from the queue, blocking if the queue is empty
576
-
{get_nowait} `(fun(): any)` Get a value from the queue, erroring if queue is empty.
577
-
{put} `(async fun(value: any): nil)` Put a value into the queue
578
-
{put_nowait} `(fun(value: any): nil)` Put a value into the queue, erroring if queue is full.
579
-
580
-
*dapui.async.control.queue()*
581
-
`queue`({max_size})
582
-
583
-
Create a new queue
584
-
Parameters~
585
-
{max_size?} `(integer)` The maximum number of items in the queue, defaults to no limit
586
-
Return~
587
-
`(dapui.async.control.Queue)`
588
-
589
-
590
-
An async semaphore that allows up to a given number of acquisitions.
591
-
*dapui.async.control.Semaphore*
592
-
Fields~
593
-
{with} `(async fun(callback: fun(): nil): nil)` Run the callback with the semaphore acquired
594
-
595
-
*dapui.async.control.semaphore()*
596
-
`semaphore`({value})
597
-
598
-
Create a new semaphore
599
-
Parameters~
600
-
{value}`(integer)` The number of allowed concurrent acquisitions
{default}`(string|nil)` Default reply to the input
715
-
{completion}`(string|nil)` Specifies type of completion supported for input. Supported types are the same that can be supplied to a user-defined command using the "-complete=" argument. See |:command-completion|
716
-
{highlight}`(function)` Function that will be used for highlighting user inputs.
717
-
718
-
*dapui.async.ui.select()*
719
-
`select`({items}, {args})
720
-
721
-
722
-
Parameters~
723
-
{items}`(any[])`
724
-
{args}`(dapui.async.ui.SelectArgs)`
725
-
726
-
*dapui.async.ui.SelectArgs*
727
-
Fields~
728
-
{prompt}`(string|nil)` Text of the prompt. Defaults to `Select one of:`
729
-
{format_item} `(function|nil)` Function to format an individual item from `items`. Defaults to `tostring`.
730
-
{kind}`(string|nil)` Arbitrary hint string indicating the item shape. Plugins reimplementing `vim.ui.select` may wish to use this to infer the structure or semantics of `items`, or the context in which select() was called.
0 commit comments