diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/block_actor.cpp | 14 | ||||
-rw-r--r-- | lib/block_task.cpp | 2 | ||||
-rw-r--r-- | lib/gras_impl/debug.hpp | 2 |
3 files changed, 14 insertions, 4 deletions
diff --git a/lib/block_actor.cpp b/lib/block_actor.cpp index fee3c88..19f8f97 100644 --- a/lib/block_actor.cpp +++ b/lib/block_actor.cpp @@ -75,8 +75,18 @@ static ThreadPool get_active_thread_pool(void) BlockActor::BlockActor(void): Apology::Worker(*get_active_thread_pool()) { - thread_pool = get_active_thread_pool(); - active_thread_pool.reset(); //actors hold this, now its safe to reset, weak_framework only + const char * gras_tpp = getenv("GRAS_TPP"); + if (gras_tpp != NULL) + { + ThreadPoolConfig config; + config.thread_count = 1; + this->thread_pool = ThreadPool(config); + } + else + { + this->thread_pool = get_active_thread_pool(); + active_thread_pool.reset(); //actors hold this, now its safe to reset, weak_framework only + } this->register_handlers(); this->handle_task_count = 0; this->work_count = 0; diff --git a/lib/block_task.cpp b/lib/block_task.cpp index 8284ccc..6796d1e 100644 --- a/lib/block_task.cpp +++ b/lib/block_task.cpp @@ -155,7 +155,7 @@ void BlockActor::handle_task(void) this->input_items.max() = std::max(this->input_items.max(), items); //inline dealings, how and when input buffers can be inlined into output buffers - /* + //* if ( buff.unique() and input_configs[i].inline_buffer and diff --git a/lib/gras_impl/debug.hpp b/lib/gras_impl/debug.hpp index e0e7a35..7ec71e0 100644 --- a/lib/gras_impl/debug.hpp +++ b/lib/gras_impl/debug.hpp @@ -25,7 +25,7 @@ extern void *operator new(std::size_t n) throw (std::bad_alloc); //-- define to enable these debugs: //---------------------------------------------------------------------- //#define WORK_DEBUG -#define ASSERTING +//#define ASSERTING //#define MESSAGE_TRACING //#define ITEM_CONSPROD //#define WORK_COUNTS |