Commit 66d554bc authored by Dominik Charousset's avatar Dominik Charousset

fixed performance issue with prioritizing policy

this patch fixes an issue with the prioritizing policy where the
low-priority cache could slow down the performance of dequeue
operations to the point where the system seems to stop;
this patch also removes the implicit addition of the priority_aware
flag whenever the detached flag is used
parent 39333e29
......@@ -31,6 +31,7 @@
#ifndef NOT_PRIORITIZING_HPP
#define NOT_PRIORITIZING_HPP
#include <list>
#include <iterator>
#include "cppa/mailbox_element.hpp"
......@@ -44,7 +45,7 @@ class not_prioritizing {
public:
typedef std::vector<unique_mailbox_element_pointer> cache_type;
typedef std::list<unique_mailbox_element_pointer> cache_type;
typedef cache_type::iterator cache_iterator;
......
......@@ -31,6 +31,7 @@
#ifndef PRIORITIZING_HPP
#define PRIORITIZING_HPP
#include <list>
#include <iostream>
#include "cppa/mailbox_element.hpp"
......@@ -43,7 +44,7 @@ class prioritizing {
public:
typedef std::vector<unique_mailbox_element_pointer> cache_type;
typedef std::list<unique_mailbox_element_pointer> cache_type;
typedef cache_type::iterator cache_iterator;
......
......@@ -102,10 +102,8 @@ constexpr spawn_options blocking_api = spawn_options::blocking_api_flag;
/**
* @brief Causes the new actor to evaluate message priorities.
* @note This implicitly causes the actor to run in its own thread.
*/
constexpr spawn_options priority_aware = spawn_options::priority_aware_flag
+ spawn_options::detach_flag;
constexpr spawn_options priority_aware = spawn_options::priority_aware_flag;
/**
* @brief Checks wheter @p haystack contains @p needle.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment