mirror of
https://github.com/c-cube/tiny_httpd.git
synced 2025-12-06 11:15:35 -05:00
add tiny_httpd_domains
This commit is contained in:
parent
b52407ea00
commit
157082a90b
3 changed files with 37 additions and 0 deletions
7
src/domains/Tiny_httpd_domains.ml
Normal file
7
src/domains/Tiny_httpd_domains.ml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
|
||||
|
||||
let new_thread pool f =
|
||||
ignore (Domainslib.Task.async pool f)
|
||||
|
||||
let run pool server =
|
||||
Domainslib.Task.run pool (fun () -> Tiny_httpd.run server)
|
||||
7
src/domains/dune
Normal file
7
src/domains/dune
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
|
||||
(library
|
||||
(name tiny_httpd_domains)
|
||||
(public_name tiny_httpd_domains)
|
||||
(synopsis "Allowing to use ocaml domains instead of theads")
|
||||
(flags :standard -safe-string -warn-error -a+8)
|
||||
(libraries tiny_httpd domainslib))
|
||||
23
tiny_httpd_domains.opam
Normal file
23
tiny_httpd_domains.opam
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
opam-version: "2.0"
|
||||
version: "0.12"
|
||||
authors: ["Christophe Raffalli"]
|
||||
maintainer: "simon.cruanes.2007@m4x.org"
|
||||
license: "MIT"
|
||||
synopsis: "Interface to camlzip for tiny_httpd"
|
||||
build: [
|
||||
["dune" "build" "@install" "-p" name "-j" jobs]
|
||||
["dune" "build" "@doc" "-p" name] {with-doc}
|
||||
["dune" "runtest" "-p" name] {with-test}
|
||||
]
|
||||
depends: [
|
||||
"dune" { >= "2.0" }
|
||||
"tiny_httpd" { = version }
|
||||
"ocaml" { >= "5.00.0" }
|
||||
"odoc" {with-doc}
|
||||
"domainslib"
|
||||
]
|
||||
tags: [ "http" "thread" "server" "domain" ]
|
||||
homepage: "https://github.com/c-cube/tiny_httpd/"
|
||||
doc: "https://c-cube.github.io/tiny_httpd/"
|
||||
bug-reports: "https://github.com/c-cube/tiny_httpd/issues"
|
||||
dev-repo: "git+https://github.com/c-cube/tiny_httpd.git"
|
||||
Loading…
Add table
Reference in a new issue