DOCS/man/lua: suggest keep_open for nested mp.input calls#17252
DOCS/man/lua: suggest keep_open for nested mp.input calls#17252kasper93 merged 1 commit intompv-player:masterfrom
Conversation
d59ef46 to
3a394bb
Compare
CogentRedTester
left a comment
There was a problem hiding this comment.
I think that there are some fundamental concepts that have not been explained in the current documentation, namely:
- That this is an asynchronous API.
- That only one request can be active at a time (shared between all clients)
- That if a new request is received while another is active, then usually the old request will be closed and the new one will be shown instead.
- That
input.selectuses the same backend asinput.getand so they cannot be active at the same time. - That
input.terminate()and the log methods apply to whichever input happens to be active, even ones created by other scripts.
If we want to leave open the possibility of requests not always overriding each other in the future, then we could add a statement like "a way to prevent a request from being overridden may be added in the future, use opened to guarantee that an input request has been opened".
|
Do you just want to take over in a new PR since you already have clear ideas of what to change?
Not sure what the use case for this would be though, it would just be reverting to the previous behavior. |
|
Could probably do it as part of #17256 if there's interest in any of the changes suggested in there. We'd then be able to update the documentation with guarantees about when things run.
I just thought there might theoretically be a desire to specify an input request that cannot be overridden by new ones (if its for something theoretically important like a password prompt for a network file). If we explicitly guarantee in the documentation that all new requests will override old ones, then something like that isn't really possible in the future without breaking things. But, if we didn't guarantee that, and instead state that the To be clear I'm not advocating for adding that kind of "high-priority" prompt, I just thought it might be worth keeping the option open since it's just a matter of wording in the documentation. |
|
Blocked by #17251. |
3a394bb to
1cede70
Compare
CogentRedTester
left a comment
There was a problem hiding this comment.
I forgot about updating the documentation as part of the other PR. I may make a new PR to do so in the future, but for the time being we may as well merge this change.
Before 17551b2 keep_open was needed to make nested mp.input calls. Even after that change it is still better to pass it to not show the console quickly closing and reopening to the user, so recommend it. Co-authored-by: CogentRedTester <cogent.redtester@outlook.com>
1cede70 to
6c0c3f2
Compare
Before #17251 keep_open was needed to make nested mp.input calls. Even after that change it is still better to pass it to not show console quickly closing and reopening to the user, so recommend it.
Depends on #17251.