|
Boost : |
Subject: Re: [boost] [GSoC] Scheduled Executors beta 1 release
From: Agustín K-ballo Bergé (kaballo86_at_[hidden])
Date: 2014-07-25 10:39:42
On 24/07/2014 10:57 p.m., Ian Forbes wrote:
> Hello,
>
> I am working on implementing scheduled executors as part of GSoC 2014 and am ready to announce my beta 1 release
>
> Basically a scheduled executor is an executor which guarantees that a certain task won't be run before a certain time point.
>
> I'm mostly interested in people reading this part of the README: https://github.com/BoostGSoC14/boost.thread.executors#possible-changes--rfcs
> This details possible changes that could be made and I would like some feedback on them as these items have both pros and cons.
> `sync_timed_queue` and `scheduled_executor` have template parameters
for a `Clock`.
There is hardly a need for this.
> This defaults to `boost::chrono::steady_clock`. There is a static
assert to ensure that `Clock` is steady.
Given that you restrict everything to steady clocks, What's the
rationale for restricting to a single `time_point` instantiation only?
Furthermore, restricting to a single `duration` makes absolutely no
sense. Any `duration` can be mapped to a steady `time_point` and still
meet the timing specifications.
> This is also satisfied by `high_resolution_clock` (...)
It is not.
> (...) is no longer a factor like with `steady_clock` and
`high_resolution_clock` which are wall clocks.
They are not (or may not be). The only guarantees are that
`system_clock` represents a wall clock, `steady_clock` represents a
clock that may not be adjusted, `high_resolution_clock` represents a
clock with the shortest tick period. In particular, `steady_clock` and
`high_resolution_clock` may be aliases for other clocks.
I've glanced at the code, and noticed that `time_point`s and `duration`s
are taken by value. The standard takes them by `const&` so I think you
should follow that.
Regards,
-- Agustín K-ballo Bergé.- http://talesofcpp.fusionfenix.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk