Changeset 5c473c9
- Timestamp:
- Feb 1, 2023, 4:31:15 PM (22 months ago)
- Branches:
- ADT, ast-experimental, master
- Children:
- 1f35220
- Parents:
- a4ab235
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/actor.hfa
ra4ab235 r5c473c9 59 59 dlist( request ) list; 60 60 request * buffer; 61 size_t count, buffer_size ;61 size_t count, buffer_size, index; 62 62 }; 63 63 static inline void ?{}( copy_queue & this ) {} … … 67 67 buffer = aalloc( buffer_size ); 68 68 count = 0; 69 index = 0; 69 70 } 70 71 static inline void ^?{}( copy_queue & this ) with(this) { adelete(buffer); } … … 88 89 count--; 89 90 should_delete = false; 90 return buffer[count]; 91 size_t old_idx = index; 92 index = count == 0 ? 0 : index + 1; 93 return buffer[old_idx]; 91 94 } 92 95 should_delete = true;
Note: See TracChangeset
for help on using the changeset viewer.