durable-execution - v0.32.0
    Preparing search index...

    Function createMutex

    • Create a mutex. Use this to run code that should not run in parallel.

      Returns Mutex

      const mutex = createMutex()

      async function runSomethingSequentially() {
      await mutex.acquire()
      try {
      // ... run something that should not run in parallel with other things
      } finally {
      mutex.release()
      }
      }