On Fri, Mar 11, 2016 at 9:22 AM, haosdent wrote:
> I saw we use Seconds(-1) represent infinity in current code.
>
> ```
> ./3rdparty/libprocess/include/process/future.hpp: bool await(const
> Duration& duration = Seconds(-1)) const;
>
I saw we use Seconds(-1) represent infinity in current code.
```
./3rdparty/libprocess/include/process/future.hpp: bool await(const
Duration& duration = Seconds(-1)) const;
./3rdparty/libprocess/include/process/latch.hpp: bool await(const
Duration& duration = Seconds(-1));
Duration and TimePoint were introduced to map to the types in C++ (
http://en.cppreference.com/w/cpp/chrono).
Duration is negative so as not to surprise users when they do TimePoints A
- B and end up with a positive duration when B > A. You could imagine a
user of these writing code to check if
IMO durations should not be negative. The problem with having them define an
infinite period is the following:
Lets say you want to compute the duration between two durations A and B:
C = A-B;
if A < B, C is negative and it will be infinite.
I one want’s to check for the case mentioned in [1]
One case I can image is to use negative value for forever duration?
Da (Klaus), Ma (马达) | PMP® | Advisory Software Engineer
Platform OpenSource Technology, STG, IBM GCG
+86-10-8245 4084 | klaus1982...@gmail.com | http://k82.me
On Wed, Mar 9, 2016 at 8:21 PM, Alex Rukletsov
Folks,
I've recently realized that durations we use in mesos (stout's `Duration`
and `DurationInfo` protobuf) are based on signed integers. Negative
duration concept is a bit strange to me, so I googled around a bit and
found an interesting thread [1].
Was it an explicit intention to allow
---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11331/#review27432
---
Can we get this committed?
- Vinod Kone
On Sept. 26, 2013, 5:58
---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11331/#review26388
---
Ship it!
---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11331/
---
(Updated Sept. 24, 2013, 6:11 p.m.)
Review request for mesos, Benjamin
---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11331/#review26318
---
3rdparty/libprocess/3rdparty/stout/include/stout/duration.hpp
---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11331/
---
(Updated Sept. 23, 2013, 9:28 p.m.)
Review request for mesos, Benjamin
On Sept. 23, 2013, 11:04 p.m., Ben Mahler wrote:
3rdparty/libprocess/3rdparty/stout/include/stout/duration.hpp, lines 286-287
https://reviews.apache.org/r/11331/diff/4/?file=356211#file356211line286
What about making this class a friend of Duration (to gain access to
the
On Sept. 23, 2013, 11:04 p.m., Ben Mahler wrote:
3rdparty/libprocess/3rdparty/stout/include/stout/duration.hpp, lines 286-287
https://reviews.apache.org/r/11331/diff/4/?file=356211#file356211line286
What about making this class a friend of Duration (to gain access to
the
---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11331/
---
(Updated Aug. 26, 2013, 6:09 p.m.)
Review request for mesos, Benjamin Hindman,
---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11331/#review25589
---
Ship it!
Ship It!
- Ben Mahler
On Aug. 26, 2013, 6:09 p.m.,
On June 6, 2013, 9:46 p.m., Ben Mahler wrote:
third_party/libprocess/third_party/stout/include/stout/duration.hpp, lines
268-281
https://reviews.apache.org/r/11331/diff/1/?file=295514#file295514line268
Well.. depends how one defines elegance, I had a hard time following
this
---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11331/
---
(Updated Aug. 15, 2013, 8:39 p.m.)
Review request for mesos, Benjamin Hindman,
17 matches
Mail list logo