Home / Function/ runWithExpiry() — bun Function Reference

runWithExpiry() — bun Function Reference

Architecture documentation for the runWithExpiry() function in AsyncLocalStorage.mjs from the bun codebase.

Entity Profile

Relationship Graph

Source Code

bench/async/AsyncLocalStorage.mjs lines 8–15

let runWithExpiry = async (expiry, fn) => {
  let iterations = 0;
  while (Date.now() < expiry) {
    await fn();
    iterations++;
  }
  return iterations;
};

Subdomains

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free