Skip to content
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

module: implement flushCompileCache() #54971

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Commits on Sep 17, 2024

  1. module: write compile cache to temporary file and then rename it

    This works better in terms of avoiding race conditions.
    joyeecheung committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    9b4d9da View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5a784d2 View commit details
    Browse the repository at this point in the history
  3. module: implement flushCompileCache()

    This implements an API for users to intentionally flush the
    accumulated compile cache instead of waiting until process
    shutdown. It may be useful for application that loads dependencies
    first and then either reload itself in other instances, or spawning
    other instances that load an overlapping set of its dependencies -
    in this case its useful to flush the cache early instead of waiting
    until the shutdown of itself.
    
    Currently flushing is triggered by either process
    shutdown or user requests. In the future we should simply start the
    writes right after module loading on a separate thread, and this method
    only blocks until all the pending writes (if any) on the other thread
    are finished. In that case, the off-thread writes should finish long
    before any attempt of flushing is made so the method would then only
    incur a negligible overhead from thread synchronization.
    joyeecheung committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    b141f8c View commit details
    Browse the repository at this point in the history