Skip to content

Commit 5c9d650

Browse files
committed
Warn about Fun.protect
1 parent e86098e commit 5c9d650

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/picos_std.finally/picos_std_finally.mli

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
A resource is something that is {i acquired} and must be {i released} after
44
it is no longer needed.
55
6+
⚠️ Beware that the Stdlib {{!Fun.protect} [Fun.protect ~finally]} helper does
7+
not {{!Picos_std_structured.Control.protect} protect against cancelation
8+
propagation} when it calls [finally ()]. This means that cancelable
9+
operations performed by [finally] may be terminated and resources might be
10+
leaked.
11+
612
We open both this library and a few other libraries
713
814
{[

0 commit comments

Comments
 (0)