/images/avatar.jpg

Wonder how much further I'll go.

muduo Poller 和 Channel

Pollerclass Poller 是IO multiplexing(多路复用)的封装,是一个纯虚类。 一个 Poller 只属于一个 class EventLoop,每一个线程最多只能有一个 class EventLoop /// /// Base

LevelDB 读写流程

@[TOC](leveldb 读写流程) API// A DB is a persistent ordered map from keys to values. // A DB is safe for concurrent access from multiple threads without // any external synchronization. class LEVELDB_EXPORT DB { public: // Open the database with the specified "name". // Stores a pointer to a heap-allocated database in *dbptr and returns // OK on success. // Stores nullptr in *dbptr and returns

LevelDB Skiplist & MemTable

skiplist 的基本原理不介绍了,本文是有关 leveldb 中 Skiplist 的实现 leveldb 对 Skiplist 的需求 无锁并发读 外部加锁的非并发insert,且 insert 的 key 不会重复 不提供 del,因为如果 leveldb 想要