Skip to content

Commit

Permalink
sources are rolled to a newer tasker library (with 'then' instead of …
Browse files Browse the repository at this point in the history
…'continue_with')
  • Loading branch information
tyoma committed Nov 28, 2024
1 parent b9dee97 commit 92d633b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions frontend/src/frontend_metadata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ namespace micro_profiler
auto request_with_caching = task<module_ptr>::run([cache, hash] {
return cache->load_metadata(hash);
}, _worker_queue)
.continue_with([this, module_id, wreq] (const async_result<module_ptr> &m) -> task< pair<module_ptr, bool> > {
.then([this, module_id, wreq] (const async_result<module_ptr> &m) -> task< pair<module_ptr, bool> > {
auto c = make_shared< task_node< pair<module_ptr, bool> > >();

if (*m)
Expand All @@ -89,12 +89,12 @@ namespace micro_profiler

request_ = req;
request_with_caching
.continue_with([ready, wreq] (const async_result< pair<module_ptr, bool> > &m) {
.then([ready, wreq] (const async_result< pair<module_ptr, bool> > &m) {
if (!wreq.expired())
ready((*m).first);
}, _apartment_queue);
request_with_caching
.continue_with([cache] (const async_result< pair<module_ptr, bool /*cached*/> > &m) {
.then([cache] (const async_result< pair<module_ptr, bool /*cached*/> > &m) {
if (!(*m).second)
cache->store_metadata(*(*m).first);
}, _worker_queue);
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/patch_moderator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ namespace micro_profiler
shared_ptr<changes_log> changes, const tables::module_mapping &mapping, profiling_cache_tasks &tasks)
{
tasks.persisted_module_id(mapping.hash)
.continue_with([cache] (const async_result<id_t> &cached_module_id) {
.then([cache] (const async_result<id_t> &cached_module_id) {
return cache->load_default_patches(*cached_module_id);
}, _worker)
.continue_with([patches, changes, mapping] (const async_result< vector<cached_patch> > &loaded) {
.then([patches, changes, mapping] (const async_result< vector<cached_patch> > &loaded) {
vector<tables::patches::patch_def> rva;
auto &changes_symbol_idx = sdb::unique_index(*changes, keyer::symbol_id());

Expand Down Expand Up @@ -127,7 +127,7 @@ namespace micro_profiler
if (added->empty() && removed->empty())
continue;
tasks.persisted_module_id(m->hash)
.continue_with([cache, added, removed] (const async_result<id_t> &cached_module_id) {
.then([cache, added, removed] (const async_result<id_t> &cached_module_id) {
cache->update_default_patches(*cached_module_id, *added, *removed);
}, _worker);
}
Expand Down

0 comments on commit 92d633b

Please sign in to comment.