# lmq **Repository Path**: stdarg/lmq ## Basic Information - **Project Name**: lmq - **Description**: litemq轻量消息队列 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-03-27 - **Last Updated**: 2024-03-29 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # lmq ## 介绍 litemq轻量消息队列 ## 安装教程 ```cpp #include #include #include "lmq_syncm.h" #include "lmq_time.h" void on_item(const std::string& key, const std::string &value) { printf("%s [%s]=%s\n", __func__, key.data(), value.data()); } int main(void) { lmq_syncm m; lmq_time t; t.boottime(); double start = t.unixnano_f64(); for (int i = 0; i < (1 << 20); i++) { char k[32]; char v[32]; snprintf(k, sizeof(k), "k%030d", i); snprintf(v, sizeof(v), "v%030d", i); m.set(k, v); } t.boottime(); double stop = t.unixnano_f64(); printf("diff=%f\n", stop - start); getchar(); m.foreach(on_item); } ```