Skip to content

popen: :wait() now has the timeout parameter #4174

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Tracked by #5096
TarantoolBot opened this issue Apr 24, 2024 · 0 comments · Fixed by #5099, #5097 or #5102
Closed
Tracked by #5096

popen: :wait() now has the timeout parameter #4174

TarantoolBot opened this issue Apr 24, 2024 · 0 comments · Fixed by #5099, #5097 or #5102
Assignees
Labels
3.2 reference [location] Tarantool manual, Reference part

Comments

@TarantoolBot
Copy link
Collaborator

TarantoolBot commented Apr 24, 2024

Related dev. issue(s): tarantool/tarantool#4915, tarantool/tarantool#7653, tarantool/tarantool#4916

Product: Tarantool
Since: 3.2
Root document: https://www.tarantool.io/en/doc/latest/reference/reference_lua/popen/#popen-wait
SME: @ Totktonada

Details

Usage example:

local ph = popen.new(<...>)
local res, err = ph:wait({timeout = 1})

if res == nil then
    -- Timeout is reached.
    assert(err.type == 'TimedOut')
    <...>
end

Also :wait() now has defined behavior when the popen handle is closed
from another fiber: the method returns the ChannelIsClosed error.

Both updates should have 'Since X.Y.Z' marks in the documentation to
allow users to decide whether to use the new features based on what
tarantool releases should be supported by the calling code. IOW, a user
may lean on the defined close-during-wait behavior or decide to don't.
The same is true for the new timeout option.

See the lbox_popen_wait() comment for the updated formal description
of the <popen handle>:wait(<...>) method.
Requested by @ Totktonada in tarantool/tarantool@735b0dc.

@andreyaksenov andreyaksenov self-assigned this Jul 29, 2024
@andreyaksenov andreyaksenov added reference [location] Tarantool manual, Reference part fiber and removed fiber labels Jul 30, 2024
@andreyaksenov andreyaksenov removed their assignment Jul 30, 2024
@AArdeev AArdeev closed this as completed May 12, 2025
AArdeev added a commit that referenced this issue May 12, 2025
Errors were grouped incorrectly.
Fixes #4174
AArdeev added a commit that referenced this issue May 12, 2025
Errors were grouped incorrectly.
Fixes #4174
AArdeev added a commit that referenced this issue May 13, 2025
Correct inherit.fds typo (change dot to underscore)
Fixes #3609 and #4174
AArdeev added a commit that referenced this issue May 13, 2025
* Fix "Since version" links format 
* Correct inherit.fds typo (change dot to underscore)

Fixes #3609 and #4174
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.2 reference [location] Tarantool manual, Reference part
Projects
None yet
3 participants