public RlmDbMgr(string databaseName, bool persistData = true) { this.persistData = persistData; this.databaseName = databaseName; if (persistData) { this.batchProcessor = new RlmDbBatchProcessor(databaseName); CaseWorkerQueues = new BlockingCollection <Case[]> [CASES_TASKS]; for (int i = 0; i < CASES_TASKS; i++) { CaseWorkerQueues[i] = new BlockingCollection <Case[]>(); int caseIndex = i; Task.Run(async() => { await saveCase(CaseWorkerQueues[caseIndex]); }); } } }
public RlmDbMgr(string databaseName) { this.databaseName = databaseName; this.batchProcessor = new RlmDbBatchProcessor(databaseName); }