You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
802 B
Markdown
25 lines
802 B
Markdown
# Producer-Consumer Scenario
|
|
|
|
The producer reads in tweets from a mockstream and a consumer is processing the data to find out whether someone has tweeted about golang or not. The task is to modify the code inside `main.go` so that producer and consumer can run concurrently to increase the throughput of this program.
|
|
|
|
## Expected results:
|
|
Before:
|
|
```
|
|
davecheney tweets about golang
|
|
beertocode does not tweet about golang
|
|
ironzeb tweets about golang
|
|
beertocode tweets about golang
|
|
vampirewalk666 tweets about golang
|
|
Process took 3.580866005s
|
|
```
|
|
|
|
After:
|
|
```
|
|
davecheney tweets about golang
|
|
beertocode does not tweet about golang
|
|
ironzeb tweets about golang
|
|
beertocode tweets about golang
|
|
vampirewalk666 tweets about golang
|
|
Process took 1.977756255s
|
|
```
|