public void read(final Consumer<ReadTxn> consumer) {
        try (final ReadTxn txn = readTxn()) {
            consumer.accept(txn);
        } catch (final RuntimeException e) {
            errorHandler.error(e);
            throw e;
        }
    }
Synchronise writes to ensure only a single thread can write.

@param consumer Consumer for the write transaction.
stroom-lmdb/src/main/java/stroom/lmdb2/LmdbEnv.java