XBT_ATTRIB_UNUSED unsigned int core_bind = 0;
for (unsigned i = 1; i < num_workers; i++) {
- this->workers[i] = new std::thread(worker_main, new ThreadData(*this, i));
+ ThreadData* data = new ThreadData(*this, i);
+ this->workers[i] = new std::thread(worker_main, data);
/* Bind the worker to a core if possible */
#if HAVE_PTHREAD_SETAFFINITY
{
Parmap<T>& parmap = data->parmap;
unsigned round = 0;
- smx_context_t context = simix_global->context_factory->create_context(std::function<void()>(), nullptr);
+ kernel::context::Context* context = simix_global->context_factory->create_context(std::function<void()>(), nullptr);
kernel::context::Context::set_current(context);
XBT_CDEBUG(xbt_parmap, "New worker thread created");