mesos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timothy Chen" <tnac...@apache.org>
Subject Re: Review Request 28052: Match future dispatch messages with type info.
Date Sat, 15 Nov 2014 09:13:37 GMT


> On Nov. 15, 2014, 4:15 a.m., Michael Park wrote:
> > Suggestion: We can simply return `const std::type_info*` rather than `std::string`
for `canonicalize`. The implementation would stay pretty much the same, and we wouldn't have
to construct these `MatchesTypeFunc` instances.
> > 
> > It looks to me the whole `MatchesTypeFunc` approach was used to try to defer the
evaluation of `typeid`. But `typeid` is guaranteed to be resolved at compile-time unless it's
invoked on a dynamic type. In this case we're only calling it on member function pointers,
which means it'll be resolved at compile-time and therefore won't ever incur any RTTI costs.

I see, but the type_info that is returned from typeid(method) is a const value reference,
which type_info has no copy or default constructor. Is it always gurantee to be a static object,
and I can take the address of what typeid returns to me even when it goes out of scope ?


- Timothy


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


On Nov. 15, 2014, 1:53 a.m., Timothy Chen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28052/
> -----------------------------------------------------------
> 
> (Updated Nov. 15, 2014, 1:53 a.m.)
> 
> 
> Review request for mesos and Benjamin Hindman.
> 
> 
> Bugs: MESOS-2112
>     https://issues.apache.org/jira/browse/MESOS-2112
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> Review: https://reviews.apache.org/r/28052
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/include/Makefile.am 542ae1c39283087da6fef69be29c811ac35f00f4 
>   3rdparty/libprocess/include/process/c++11/dispatch.hpp 76da2828cf36b6143d627dac66f3e0cc4416bae4

>   3rdparty/libprocess/include/process/dispatch.hpp bceda2a2ae8963921e8e19660243a8644feab227

>   3rdparty/libprocess/include/process/event.hpp 294e2158876b25b06456a3619e547082d71e31ed

>   3rdparty/libprocess/include/process/gmock.hpp d6f2fc8fef8acd1498a36c86e09b28d986eefa15

>   3rdparty/libprocess/include/process/type.hpp PRE-CREATION 
>   3rdparty/libprocess/src/process.cpp 5842705ae78ebe36c1c01bfcd468e9ebe55de3be 
> 
> Diff: https://reviews.apache.org/r/28052/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Timothy Chen
> 
>


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