Skip to content

Conversation

@bollwyvl
Copy link
Contributor

@bollwyvl bollwyvl commented Nov 17, 2025

changes

  • reject ready if disposed
old description

references

changes

  • add Private.withKernelInitLock so only one kernel at a time is initializing its worker

test procedure

  • wait for RTD
    • start three notebooks quickly
    • restart Untitled2's kernel while Untitled is starting
    • delete Untitled1
    • see Untitled and Untitled2 (eventually) go into the happy-path idle state
image

@github-actions
Copy link
Contributor

lite-badge 👈 Try it on ReadTheDocs

@bollwyvl bollwyvl added the enhancement New feature or request label Nov 17, 2025
@bollwyvl bollwyvl changed the title Use a promise lock to serialize remote kernel initialization Use a promise lock to serialize Worker runtime initialization Nov 17, 2025
@bollwyvl bollwyvl marked this pull request as ready for review November 17, 2025 23:55
@bollwyvl bollwyvl requested a review from jtpio November 17, 2025 23:55
@jtpio
Copy link
Member

jtpio commented Nov 18, 2025

Thanks @bollwyvl.

While this may help mitigate the underlying issue, it looks like there is a deeper issue to address.

Opened jupyterlite/jupyterlite#1781 to investigate this more with a couple of fixes (some related to emscripten 4), and it seems to be behaving fine so far on the ReadTheDocs preview.

@bollwyvl
Copy link
Contributor Author

Great, love the date fixes! ⏲️ I'll strip out the locking changes, but leave the promise rejection, as that was almost certainly having some fun side-effects.

@bollwyvl bollwyvl changed the title Use a promise lock to serialize Worker runtime initialization Reject kernel ready promise when disposed Nov 18, 2025
@bollwyvl
Copy link
Contributor Author

I'll assume the lingering fail is due to CDN issues...

@jtpio jtpio added this to the 0.7.0 milestone Nov 19, 2025
Copy link
Member

@jtpio jtpio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@jtpio jtpio merged commit dbad325 into jupyterlite:main Nov 19, 2025
46 of 50 checks passed
@bollwyvl bollwyvl deleted the gh-1743-serial-init branch November 19, 2025 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants