auto self = shared_from_this();\r
return async(launch::deferred, [self, buffer]() mutable -> array<const std::uint8_t>\r
{\r
- const auto& buf = buffer.get();\r
- if(!buf->data())\r
- self->alloc_executor_.invoke(std::bind(&buffer::map, std::ref(buf))); // Defer blocking "map" call until data is needed.\r
-\r
- return array<const std::uint8_t>(buf->data(), buf->size(), true, buffer);\r
+ self->alloc_executor_.invoke(std::bind(&buffer::map, std::ref(buffer))); // Defer blocking "map" call until data is needed.\r
+ return array<const std::uint8_t>(buffer->data(), buffer->size(), true, buffer);\r
});\r
}\r
};\r