{
"repo": "libpearsync",
"timestamp": "2026-01-16T23:55:51.256Z",
"entryPoint": null,
"exports": {},
"api": {},
"readme": {
"content": "# libpearsync\n\nSimple message passing between a libuv thread and something else.\n\n* No locks.\n* No allocs (*)\n* No fuzz\n\n*... unless you send > 1024 messages in one tick, at which stage an extra buffer is allocated*\n\n## Usage\n\nSee `example.c` for a fully runnable example\n\n``` c\n// somewhere (but only in one place), init it\npearsync_t sync;\npearsync_init(&sync);\n\n// then pass it to the libuv thread somehow and call\npearsync_port_t *uv_port = pearsync_open_uv(&sync, uv_loop, on_recv_uv);\n\n// then in the other thread call\npearsync_port_t *port = pearsync_open_thread(&sync, signal_thread, on_recv_thread);\n\n// pearsync doesnt know how to signal your other thread, so you need to pass a function\n// signal_thread that does this for it, the signature of it is\n\nvoid signal_thread (pearsync_port_t *port) {\n // ... somehow signal the other thread, and when so do\n pearsync_wakeup(port);\n}\n\n// note that these two open calls are threadsafe!\n// the wakeup function is called when there is something t",
"sections": [
"intro",
"usage",
"license"
],
"hasApi": true,
"hasExamples": false,
"exampleCount": 0,
"examples": []
},
"patterns": []
}