'What is the term for "to asynchronously return"?

Many programming languages have the concept of asynchronous functions. The return value of an async function is not the required type itself, but a promise/future that will eventually contain the value.

I'm doing technical writing and I'm struggling to come up with a succinct term for the act of asynchronously returning a value. Consider the following synchronous function:

function foo(): boolean { ... }

Here, I'd write "If foo returns true, ..." This is perfectly understandable.

Now consider this asynchronous function:

function bar(): Promise<boolean> { ... }

I could write: "If bar returns a promise that resolves to true, ..." This is technically correct, but rather awkward, especially if used repeatedly.

I could write: "If bar asynchronously returns true, ..." This is shorter, but I'm not quite happy with it. To me, it puts the emphasis on "asynchronously", not on "true".

I could write: "If bar returns true, ..." This is short, but not technically correct.

I would like to write something like: "If bar yields true, ...", but the verb to yield already has a different meaning in the context of iterables (at least in some languages).

Is there a succinct way of expressing this concept?



Solution 1:[1]

browser.find_elements_by_xpath() will return a list. lists are 0-based index, so these should work:

rental = browser.find_elements_by_xpath("//ul[@class='rental-facilities']")[2]
feature = rental.find_elements_by_xpath("//li[@class='feature']")[0].text

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Breaks Software