aboutsummaryrefslogtreecommitdiff
path: root/src/logging.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2016-11-18 04:39:31 +0100
committerFlorian Dold <florian.dold@gmail.com>2016-11-18 04:39:31 +0100
commit9a908c105ff56f39a17d99165d7ac77decc186ec (patch)
tree230c04f4d5ab125e116204a4a4771e1c7967dad2 /src/logging.ts
parenteb9677c374418384f1a96eba95153dc69ebfccc4 (diff)
document barrier
Diffstat (limited to 'src/logging.ts')
-rw-r--r--src/logging.ts5
1 files changed, 5 insertions, 0 deletions
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<LogEntry[]> {
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<void> {