• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

typeorm / typeorm / 14796576772

02 May 2025 01:52PM UTC coverage: 45.367% (-30.9%) from 76.309%
14796576772

Pull #11434

github

web-flow
Merge ec4ce2d00 into fadad1a74
Pull Request #11434: feat: release PR releases using pkg.pr.new

5216 of 12761 branches covered (40.87%)

Branch coverage included in aggregate %.

11439 of 23951 relevant lines covered (47.76%)

15712.55 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

7.69
/src/query-runner/QueryLock.ts
1
export class QueryLock {
4✔
2
    private readonly queue: Promise<void>[] = []
×
3

4
    async acquire(): Promise<() => void> {
5
        let release: Function
6
        const waitingPromise = new Promise<void>((ok) => (release = ok))
×
7

8
        // Get track of everyone we need to wait on..
9
        const otherWaitingPromises = [...this.queue]
×
10
        // Put ourselves onto the end of the queue
11
        this.queue.push(waitingPromise)
×
12

13
        if (otherWaitingPromises.length > 0) {
×
14
            await Promise.all(otherWaitingPromises)
×
15
        }
16

17
        return () => {
×
18
            release()
×
19

20
            if (this.queue.includes(waitingPromise)) {
×
21
                this.queue.splice(this.queue.indexOf(waitingPromise), 1)
×
22
            }
23
        }
24
    }
25
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc