Topic: [RFC] C++ apparently lacks a good mechanism for


Author: raphael.scarv@gmail.com
Date: Fri, 19 Feb 2016 13:44:53 -0800 (PST)
Raw View
------=_Part_4034_2115565788.1455918293277
Content-Type: multipart/alternative;
 boundary="----=_Part_4035_1098960501.1455918293277"

------=_Part_4035_1098960501.1455918293277
Content-Type: text/plain; charset=UTF-8

I am very sorry if this topic is unrelated to the topics covered by this
mailing list.

While developing a small project which consists of exporting a blockv
device via network (if you are curious:
https://github.com/raphaelsc/blockv), there was the need to lock a range of
a shared resource, such as a file. I searched for resources coming from C++
standard library, but I wasn't able to find anything that would fit my
needs. Am I missing something?

Anyway, I ended up implementing my own range locking mechanism. The
implementation is quite simple, feel free to look it at:
https://github.com/raphaelsc/byte-range-lock-cpp/blob/master/range_lock.hh
(I made my best effort to document it well)

Is there any chance that something like range_lock will be made available
in the next versions of C++ standard library?

Thank you very much for reading this,

Raphael Carvalho

--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/50b133be-1afd-4ec9-a0a7-0729f88fbaf2%40isocpp.org.

------=_Part_4035_1098960501.1455918293277
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">I am very sorry if this topic is unrelated to the topics c=
overed by this mailing list.<br><br>While developing a small project which =
consists of exporting a blockv device via network (if you are curious: http=
s://github.com/raphaelsc/blockv), there was the need to lock a range of a s=
hared resource, such as a file. I searched for resources coming from C++ st=
andard library, but I wasn&#39;t able to find anything that would fit my ne=
eds. Am I missing something?<br><br>Anyway, I ended up implementing my own =
range locking mechanism. The implementation is quite simple, feel free to l=
ook it at: https://github.com/raphaelsc/byte-range-lock-cpp/blob/master/ran=
ge_lock.hh (I made my best effort to document it well)<br><br>Is there any =
chance that something like range_lock will be made available in the next ve=
rsions of C++ standard library?<br><br>Thank you very much for reading this=
,<br><br>Raphael Carvalho<br></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/50b133be-1afd-4ec9-a0a7-0729f88fbaf2%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/50b133be-1afd-4ec9-a0a7-0729f88fbaf2=
%40isocpp.org</a>.<br />

------=_Part_4035_1098960501.1455918293277--
------=_Part_4034_2115565788.1455918293277--

.