mirror of
https://github.com/c-cube/nanoev.git
synced 2026-03-08 06:58:01 -04:00
Compare commits
No commits in common. "870093e93ae544a1a4a6fb566e3915be9469f953" and "604224d1cf8fd51811c6796d799451aed6738d05" have entirely different histories.
870093e93a
...
604224d1cf
7 changed files with 21 additions and 27 deletions
|
|
@ -1,3 +0,0 @@
|
|||
# 0.1
|
||||
|
||||
initial release, with poll and select backends.
|
||||
|
|
@ -1,11 +1,16 @@
|
|||
(lang dune 2.7)
|
||||
|
||||
(name nanoev)
|
||||
|
||||
(generate_opam_files true)
|
||||
|
||||
(source
|
||||
(github c-cube/nanoev))
|
||||
|
||||
(authors "Simon Cruanes")
|
||||
|
||||
(maintainers "Simon Cruanes")
|
||||
(version 0.1)
|
||||
|
||||
(license MIT)
|
||||
|
||||
;(documentation https://url/to/documentation)
|
||||
|
|
|
|||
|
|
@ -15,11 +15,6 @@ let main () : unit =
|
|||
let n_tasks_done = Atomic.make 0 in
|
||||
let n_sent = Atomic.make 0 in
|
||||
let n_recv = Atomic.make 0 in
|
||||
|
||||
let remoteaddr = Unix.ADDR_INET (Unix.inet_addr_loopback, !port) in
|
||||
|
||||
(let@ pool = Moonpool.Ws_pool.with_ ~num_threads:!j () in
|
||||
|
||||
ignore
|
||||
(Thread.create
|
||||
(fun () ->
|
||||
|
|
@ -36,6 +31,10 @@ let main () : unit =
|
|||
()
|
||||
: Thread.t);
|
||||
|
||||
(let@ pool = Moonpool.Ws_pool.with_ ~num_threads:!j () in
|
||||
|
||||
let remoteaddr = Unix.ADDR_INET (Unix.inet_addr_loopback, !port) in
|
||||
|
||||
let task () =
|
||||
let[@alert "-deprecated"] _sp =
|
||||
Trace.enter_manual_toplevel_span ~__FILE__ ~__LINE__ "task.run"
|
||||
|
|
@ -65,9 +64,6 @@ let main () : unit =
|
|||
done
|
||||
in
|
||||
|
||||
if Random.float 1. > 0.992 then
|
||||
Trace.counter_int "n-tasks" (Moonpool.Runner.num_tasks pool);
|
||||
|
||||
Picos.Fiber.(yield ());
|
||||
|
||||
(* receive a response *)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
# This file is generated by dune, edit dune-project instead
|
||||
opam-version: "2.0"
|
||||
version: "0.1"
|
||||
synopsis: "Use nanoev from picos"
|
||||
maintainer: ["Simon Cruanes"]
|
||||
authors: ["Simon Cruanes"]
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
# This file is generated by dune, edit dune-project instead
|
||||
opam-version: "2.0"
|
||||
version: "0.1"
|
||||
synopsis: "Use mtime+iomux (posix compliant) as a backend for nanoev"
|
||||
maintainer: ["Simon Cruanes"]
|
||||
authors: ["Simon Cruanes"]
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
# This file is generated by dune, edit dune-project instead
|
||||
opam-version: "2.0"
|
||||
version: "0.1"
|
||||
synopsis: "Tiny event loop abstraction"
|
||||
maintainer: ["Simon Cruanes"]
|
||||
authors: ["Simon Cruanes"]
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
# This file is generated by dune, edit dune-project instead
|
||||
opam-version: "2.0"
|
||||
version: "0.1"
|
||||
synopsis: "Use nanoev as a basis for tiny_httpd"
|
||||
maintainer: ["Simon Cruanes"]
|
||||
authors: ["Simon Cruanes"]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue