From 9a908c105ff56f39a17d99165d7ac77decc186ec Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Fri, 18 Nov 2016 04:39:31 +0100 Subject: document barrier --- src/logging.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/logging.ts b/src/logging.ts index 16aa851bc..ff0987396 100644 --- a/src/logging.ts +++ b/src/logging.ts @@ -126,6 +126,11 @@ export async function getLogs(): Promise { return await new QueryRoot(db).iter(logsStore).toArray(); } +/** + * The barrier ensures that only one DB write is scheduled against the log db + * at the same time, so that the DB can stay responsive. This is a bit of a + * design problem with IndexedDB, it doesn't guarantee fairness. + */ let barrier: any; export async function record(level: Level, msg: string, source?: string, line?: number, col?: number): Promise { -- cgit v1.2.3