mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitry Zhuk <dz...@twopensource.com>
Subject Review Request 64338: Reduced number of supported arguments in _Deferred conversion operators.
Date Tue, 05 Dec 2017 12:18:11 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/64338/
-----------------------------------------------------------

Review request for mesos, Benjamin Mahler and Michael Park.


Repository: mesos


Description
-------

Conversion of `_Deferred` to `std::function` and `Deferred` currently
supports up to 12 parameters in function signature. However, this is
unnecessary and is a huge overhead. Most usages require just one
parameter (e.g. when `defer` is used with `Future`). And there are few
usages with two parameters (in `master.cpp` to initialize allocator, and
in `slave.cpp` to install signal handler).
This number of parameters is different from the number of parameters
passed to `defer`, but it's related and can be defined as maximum number
of placeholders that can be passed to `defer`.

Given that `deferred.hpp` is indirectly included in most source files,
it is beneficial to keep this number low. This patch changes maximum
number of parameters to 2.


Diffs
-----

  3rdparty/libprocess/include/process/deferred.hpp 950f1cccaf93298664a95ba1fd2c5d2a42deb725



Diff: https://reviews.apache.org/r/64338/diff/1/


Testing
-------

make check


Thanks,

Dmitry Zhuk


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message