Changeset 2a301ff for libcfa/src/concurrency/select.hfa
- Timestamp:
- Aug 31, 2023, 11:31:15 PM (2 years ago)
- Branches:
- master
- Children:
- 950c58e
- Parents:
- 92355883 (diff), 686912c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 edited
-
libcfa/src/concurrency/select.hfa (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/select.hfa
r92355883 r2a301ff 17 17 #pragma once 18 18 19 #include "co ntainers/list.hfa"19 #include "collections/list.hfa" 20 20 #include "alarm.hfa" 21 21 #include "kernel.hfa" … … 94 94 95 95 // This routine is run on the selecting thread prior to executing the statement corresponding to the select_node 96 // passed as an arg to this routine 97 // If on_selected returns false, the statement is not run, if it returns true it is run. 98 void on_selected( T &, select_node & ); 96 // passed as an arg to this routine. If true is returned proceed as normal, if false is returned the statement is skipped 97 bool on_selected( T &, select_node & ); 99 98 }; 99 // Used inside the compiler to allow for overloading on return type for operations such as '?<<?' for channels 100 // YOU MUST USE THIS MACRO OR INCLUDE AN EQUIVALENT DECL FOR YOUR TYPE TO SUPPORT WAITUNTIL 101 #define __CFA_SELECT_GET_TYPE( typename ) typename __CFA_select_get_type( typename __CFA_t ) 102 100 103 101 104 //============================================================================================= … … 208 211 bool register_select( select_timeout_node & this, select_node & node ); 209 212 bool unregister_select( select_timeout_node & this, select_node & node ); 210 void on_selected( select_timeout_node & this, select_node & node ); 213 bool on_selected( select_timeout_node & this, select_node & node ); 214 select_timeout_node __CFA_select_get_type( select_timeout_node this ); 211 215 212 216 // Gateway routines to waituntil on duration 213 217 select_timeout_node timeout( Duration duration ); 214 218 select_timeout_node sleep( Duration duration ); 219
Note:
See TracChangeset
for help on using the changeset viewer.