2 Copyright (c) 2005-2019 Intel Corporation
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
8 http://www.apache.org/licenses/LICENSE-2.0
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
17 #ifndef __TBB_flow_graph_abstractions_H
18 #define __TBB_flow_graph_abstractions_H
22 namespace interface11 {
24 //! Pure virtual template classes that define interfaces for async communication
27 //! Inform a graph that messages may come from outside, to prevent premature graph completion
28 virtual void reserve_wait() = 0;
30 //! Inform a graph that a previous call to reserve_wait is no longer in effect
31 virtual void release_wait() = 0;
33 virtual ~graph_proxy() {}
36 template <typename Input>
37 class receiver_gateway : public graph_proxy {
39 //! Type of inputing data into FG.
40 typedef Input input_type;
42 //! Submit signal from an asynchronous activity to FG.
43 virtual bool try_put(const input_type&) = 0;
48 using interface11::graph_proxy;
49 using interface11::receiver_gateway;