- Timestamp:
- Mar 4, 2023, 2:58:57 PM (18 months ago)
- Branches:
- ADT, ast-experimental, master
- Children:
- 4933f18
- Parents:
- 2856044a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/actor.hfa
r2856044a r858350a 662 662 663 663 // Default messages to send to any actor to change status 664 // struct __DeleteMsg { inline message; } DeleteMsg; 665 // void ?{}( __DeleteMsg & this ) { ((message &) this){ Finished }; } 666 // struct __DestroyMsg { inline message; } DestroyMsg; 667 // void ?{}( __DestroyMsg & this ) { ((message &) this){ Finished }; } 668 // struct __FinishedMsg { inline message; } FinishedMsg; 669 // void ?{}( __FinishedMsg & this ) { ((message &) this){ Finished }; } 670 671 // Allocation receive( actor & this, __DeleteMsg & msg ) { return Delete; } 672 // Allocation receive( actor & this, __DestroyMsg & msg ) { return Destroy; } 673 // Allocation receive( actor & this, __FinishedMsg & msg ) { return Finished; } 664 // assigned at creation to __base_msg_finished to avoid unused message warning 665 message __base_msg_finished @= { .allocation_ : Finished }; 666 struct __DeleteMsg { inline message; } DeleteMsg = __base_msg_finished; 667 struct __DestroyMsg { inline message; } DestroyMsg = __base_msg_finished; 668 struct __FinishedMsg { inline message; } FinishedMsg = __base_msg_finished; 669 void ?{}( __DeleteMsg & this, Allocation status ) { ((message &) this){ status }; } 670 void ?{}( __DestroyMsg & this, Allocation status ) { ((message &) this){ status }; } 671 void ?{}( __FinishedMsg & this, Allocation status ) { ((message &) this){ status }; } 672 673 Allocation receive( actor & this, __DeleteMsg & msg ) { return Delete; } 674 Allocation receive( actor & this, __DestroyMsg & msg ) { return Destroy; } 675 Allocation receive( actor & this, __FinishedMsg & msg ) { return Finished; }
Note: See TracChangeset
for help on using the changeset viewer.