+extern "C" {
+
+int alloc_allowed ()
+{
+ return !graph->in_process_thread ();
+}
+
+}
+#endif
+
+Graph::Graph (Session & session)
+ : SessionHandleRef (session)
+ , _quit_threads (false)
+ , _execution_sem ("graph_execution", 0)
+ , _callback_start_sem ("graph_start", 0)
+ , _callback_done_sem ("graph_done", 0)
+ , _cleanup_sem ("graph_cleanup", 0)