package tiny_httpd

  1. Overview
  2. Docs
Minimal HTTP server using threads

Install

dune-project
 Dependency

Authors

Maintainers

Sources

tiny_httpd-0.22.tbz
sha256=09fb93125c26b99f8714d0060dd3fb972046cde3ff935626d495b25e80543d8e
sha512=5751a0ac007c8cad11255d08b4915c8a8fb82ad33d28e58809ef1e29dc8c8f2fceb0dd15ecbe1fda5b5db2edbbc9479fa1d0690a4a25949e1d1b375ea13bd1a9

doc/tiny_httpd.ws/Tiny_httpd_ws/With_lock/index.html

Module Tiny_httpd_ws.With_lockSource

Synchronization primitive used to allow both the reader to reply to "ping", and the handler to send messages, without stepping on each other's toes.

  • since 0.21
Sourcetype t = {
  1. with_lock : 'a. (unit -> 'a) -> 'a;
}

A primitive to run the callback in a critical section where others cannot run at the same time.

The default is a mutex, but that works poorly with thread pools so it's possible to use a semaphore or a cooperative mutex instead.

Sourcetype builder = unit -> t
Sourceval default_builder : builder

Lock using Mutex.