package memprof-limits

  1. Overview
  2. Docs
Memory limits, allocation limits, and thread cancellation

Install

dune-project
 Dependency

Authors

Maintainers

Sources

memprof-limits-v0.3.0.tar.gz
md5=39c73e7f96b5e5a01cf74937e2a5a1ae
sha512=a0049fec23c054eef19a924e5be810ecf9de4f697bd09b133e64c244b7ea09f416cec627ccce412ae793c265043894a878f0d822bcc47a2e622526f96d14af25

doc/memprof-limits/Memprof_limits/Resource_bind/index.html

Module Memprof_limits.Resource_bindSource

Open Memprof_limits.Resource_bind to enable the let& binder for resources.

Sourceval (let&) : (scope:('a -> 'b) -> 'b) -> ('a -> 'b) -> 'b

RAII-style notation for resources cleaned-up at the end of scope. Example:

open Memprof_limits.Resource_bind

let with_my_resource x =
  Memprof_limits.Masking.with_resource ~acquire x ~release

let f x =
  let& resource = with_my_resource x in
  …