-
-
Notifications
You must be signed in to change notification settings - Fork 423
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
start: Make start-browser synchronous. #2740
Conversation
ffa70b9
to
88ed5cf
Compare
I like how it looks! But I want to see the changes to tests too, so that we see how it works in headless scenarios.
No, seems fine. Along the lines of
Hmmmmm. The case of So there seems to be no solid convention due to lack of clear meaning for things. That's the same problem I've encountered when trying to abstract our concurrency patterns: we don't have many patterns at all. There are lots of unique cases which are not abstractable because of their. The only reliable option I can think of for this (a)synchronization is to store the promise/completion predicate inside the function itself. Completion predicate would mean less |
If
|
Hmmmm. I'd rather separate those two, because synchronous |
Ok, then I'll wait for developments on this PR. |
Yes it should. Will investigate. |
@aartaka Looks like you forgot a word :) |
The fundamental reason behind this is given by
We could use the unportable Turns out that In any case, this is a general issue and goes beyond this pull request, so I don't think it's a blocker to merge this. |
There is no point in having it asynchronous, since anything run in parallel before browser is ready is likely to trigger a race conditions or undefined behaviour. It simplifies testing a lot.
`start' is now synchronous.
64e346b
to
806d7b8
Compare
@aartaka Tests don't use |
Thanks @Ambrevar. Ok to merge? |
Neat! This PR looks just perfect to me now 🤩 |
Done! |
Thanks, Pierre |
Description
There is no point in having it asynchronous, since anything run in parallel before browser is ready is likely to trigger a race conditions or undefined behaviour.
It simplifies testing a lot.
Fixes #2718 (comment).
Discussion
nyxt:after-startup-hook
since it's not needed anymore.synchronize
asynchronous functions. It's difficult, because we don't really have a convention for these async functions and it heavily depends on WebKitGTK. For instance,buffer-load
is "finished" when theon-signal-load-finished
signal is triggered, in which we call thebuffer-loaded-hook
. This is completely different fromstart-browser
. Can we devise a convention somehow?Checklist:
Everything in this checklist is required for each PR. Please do not approve a PR that does not have all of these items.
cd /path/to/nyxt/checkout git submodule add https://gitlab.common-lisp.net/nyxt/py-configparser _build/py-configparser
:documentation
s written in the aforementioned style. (It's OK to skip the docstring for really trivial parts.)changelog.lisp
with my changes if it's anything user-facing (new features, important bug fix, compatibility breakage).migration.lisp
entry for all compatibility-breaking changes.