summaryrefslogtreecommitdiff
path: root/include/gras
diff options
context:
space:
mode:
authorJosh Blum2013-06-05 21:28:17 -0700
committerJosh Blum2013-06-05 21:28:17 -0700
commit58a54c2cc19113d7644b80ec032b89fa1c38a54a (patch)
tree145b5b28011410166401e3a01361f77fa4dbadca /include/gras
parent7889847eed1e8bc003b88b0d6ad4f7904873d2ac (diff)
downloadsandhi-58a54c2cc19113d7644b80ec032b89fa1c38a54a.tar.gz
sandhi-58a54c2cc19113d7644b80ec032b89fa1c38a54a.tar.bz2
sandhi-58a54c2cc19113d7644b80ec032b89fa1c38a54a.zip
gras: separate actor data to struct to aid migration
Diffstat (limited to 'include/gras')
-rw-r--r--include/gras/block.hpp8
-rw-r--r--include/gras/block.i1
2 files changed, 9 insertions, 0 deletions
diff --git a/include/gras/block.hpp b/include/gras/block.hpp
index 378358e..5a6e5e2 100644
--- a/include/gras/block.hpp
+++ b/include/gras/block.hpp
@@ -5,6 +5,7 @@
#include <gras/element.hpp>
#include <gras/sbuffer.hpp>
+#include <gras/thread_pool.hpp>
#include <gras/tag_iter.hpp>
#include <gras/tags.hpp>
#include <gras/work_buffer.hpp>
@@ -488,6 +489,13 @@ struct GRAS_API Block : Element
******************************************************************/
/*!
+ * Set the thread pool of this block.
+ * Every block is created in the default active thread pool.
+ * This call will migrate the block to a new specified pool.
+ */
+ void set_thread_pool(const ThreadPool &thread_pool);
+
+ /*!
* Set if the work call should be interruptible by stop().
* Some work implementations block with the expectation of
* getting a boost thread interrupt in a blocking call.
diff --git a/include/gras/block.i b/include/gras/block.i
index cce0d15..5c62f7e 100644
--- a/include/gras/block.i
+++ b/include/gras/block.i
@@ -12,6 +12,7 @@
%include <gras/tag_iter.i>
%import <gras/sbuffer.i>
%include <gras/buffer_queue.hpp>
+%include <gras/thread_pool.hpp>
%include <gras/block.hpp>
////////////////////////////////////////////////////////////////////////