Dear hpx-users, I made a lock-free priority queue backend for evaluation purposes and am now trying to use it with HPX through a custom scheduler. For this I extended the scheduler_base class and created a custom thread pool with a resource partitioner. My custom scheduler is very similar to the shared_priority_scheduler provided in hpx/examples/resource_partitioner, but instead of maintaining normal-priority queues for each worker thread, it maintains a single priority queue which all worker threads share access to.
Is the base class thread_queue safe to use with all worker threads accessing the same object? For the correct use of my priority queue backend one of course needs a priority associated with each scheduled thread. However, when used for the thread_queue PendingQueueing, the queue backend is only handed a hpx::thread::thread_data* Is it possible -and if yes, how would you go about it- to use the information in thread_data to 1.) identify wether a scheduled thread represents a user provided function (e.g. actions started with async and such) or if it emerged otherwise (without the user being in charge of the _couroutines parameters) 2.) access a user provided priority for the thread For 2.) I thought about just using the enum thread_data::thread_priority as an integer, but this would require the creation of one executor for each desired priority value... I'd rather pass the priority as an argument in hpx::async and the like (just like policies, executors, target components etc.) but can I unpack a parameter through the thread_data* ? Thanks in Advance, Kilian Werner _______________________________________________ hpx-users mailing list [email protected] https://mail.cct.lsu.edu/mailman/listinfo/hpx-users
