Let workers tolerate that the actual core they are running on is not the intended CPU core.

This commit is contained in:
Michael Mueller
2024-07-23 16:26:32 +02:00
parent 5aa7a905f7
commit 4ee2b58379

View File

@@ -27,8 +27,9 @@ void Worker::execute()
} }
TaskInterface *task; TaskInterface *task;
const auto core_id = system::topology::core_id(); const auto core_id = _target_core_id;
assert(this->_target_core_id == core_id && "Worker not pinned to correct core."); //system::topology::core_id();
//assert(this->_target_core_id == core_id && "Worker not pinned to correct core.");
const auto channel_id = this->_channel.id(); const auto channel_id = this->_channel.id();
while (this->_is_running) while (this->_is_running)
@@ -101,6 +102,8 @@ void Worker::execute()
case synchronization::primitive::ExclusiveLatch: case synchronization::primitive::ExclusiveLatch:
result = Worker::execute_exclusive_latched(core_id, channel_id, task); result = Worker::execute_exclusive_latched(core_id, channel_id, task);
break; break;
default:
result = task->execute(core_id, channel_id);
} }
// The task-chain may be finished at time the // The task-chain may be finished at time the