courses:high_performance_computing:producer_consumer
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Last revisionBoth sides next revision | ||
courses:high_performance_computing:producer_consumer [2024/03/04 01:55] – odoronin | courses:high_performance_computing:producer_consumer [2024/03/04 02:01] – odoronin | ||
---|---|---|---|
Line 34: | Line 34: | ||
void* producer_routine(void* arg) { | void* producer_routine(void* arg) { | ||
// Wait for consumer to start. | // Wait for consumer to start. | ||
- | // You can use this waiting only for debugging your code | + | // You should |
- | // For final solution please remove this waiting | + | // For the final solution please remove this waiting |
// Read data, loop through each value and update the value, notify consumer, wait for consumer to process | // Read data, loop through each value and update the value, notify consumer, wait for consumer to process | ||
Line 44: | Line 44: | ||
void* consumer_routine(void* arg) { | void* consumer_routine(void* arg) { | ||
// notify about start | // notify about start | ||
- | // you can use this notification only for debugging your code | + | // you should |
- | // for final solution please remove this notification | + | // for the final solution please remove this notification |
| | ||
| | ||
Line 54: | Line 54: | ||
void* consumer_interruptor_routine(void* arg) { | void* consumer_interruptor_routine(void* arg) { | ||
// wait for consumers to start | // wait for consumers to start | ||
- | // you can use this waiting only for debugging your code | + | // you should |
- | // for final solution please remove this waiting | + | // for the final solution please remove this waiting |
// interrupt random consumer while producer is running | // interrupt random consumer while producer is running |
courses/high_performance_computing/producer_consumer.txt · Last modified: 2024/03/04 02:19 by odoronin