[patch] Avoid memory allocations when making futures ready
Thu Aug 7 20:13:00 GMT 2014
This patch replaces some reference members with pointers, so that the
types containing them become trivial and are more efficient to pass as
function arguments and can use the small object optimization when
stored in a std::function, so that promise::set_value() doesn't need
to allocate any memory.
_Task_setter is also changed to store a pointer to the task, instead
of using a std::function to hold it.
Tested x86_64-linux, committed to trunk.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 10559 bytes
Desc: not available
More information about the Libstdc++