Skip to content

Commit

Permalink
removing mutex lock from scheduler compnent for now
Browse files Browse the repository at this point in the history
  • Loading branch information
hendrx committed Mar 3, 2017
1 parent 4c1facd commit 6e69bbf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
11 changes: 11 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>i3login_allscale_runtime</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
</natures>
</projectDescription>
6 changes: 3 additions & 3 deletions src/components/scheduler_component.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,14 +185,14 @@ namespace allscale { namespace components {
//having some slight error in total_length or num_threads, because of
//outdated data (in case more threads got assigned after the counters
//where read) this wont do too much harm i guess ???
std::unique_lock<mutex_type> l(counters_mtx_);
//std::unique_lock<mutex_type> l(counters_mtx_);
// Do we have enough tasks in the system?
if (total_length_ < num_threads_ * 10)
{
hpx::util::unlock_guard<std::unique_lock<mutex_type> > ul(l);
//hpx::util::unlock_guard<std::unique_lock<mutex_type> > ul(l);
return total_idle_rate_ >= 10.0;
}
hpx::util::unlock_guard<std::unique_lock<mutex_type> > ul(l);
//hpx::util::unlock_guard<std::unique_lock<mutex_type> > ul(l);
return total_idle_rate_ < 10.0;
}

Expand Down

0 comments on commit 6e69bbf

Please sign in to comment.