(entry: Entry, build: Build)
| 6444 | |
| 6445 | /** Waits for a caller-only fetch, joining the one in flight. */ |
| 6446 | const getShared = (entry: Entry, build: Build): Effect.Effect<any, any> => |
| 6447 | Effect.callback<any, any>((resume) => { |
| 6448 | const waiter: Waiter = { build, resume, shared: undefined } |
| 6449 | if (entry.shared === undefined) { |
| 6450 | startShared(entry, build, [waiter], false) |
| 6451 | } else { |
| 6452 | waiter.shared = entry.shared |
| 6453 | entry.shared.callers.add(waiter) |
| 6454 | } |
| 6455 | return Effect.sync(() => leave(entry, waiter)) |
| 6456 | }) |
| 6457 | |
| 6458 | /** Waits for the stored fetch, starting one when none is in flight. */ |
| 6459 | const getStored = (entry: Entry, build: Build): Effect.Effect<any, any> => |
no test coverage detected