Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
courses:cs377-201951:week10 [2019/04/08 13:33] mlsmith |
courses:cs377-201951:week10 [2019/04/10 01:37] mlsmith [Channels, CSP, and Go] |
||
---|---|---|---|
Line 18: | Line 18: | ||
* ultimate lightweight processes! | * ultimate lightweight processes! | ||
* composition! | * composition! | ||
- | * Legoland: slide 83-end of basics.pdf | + | * Legoland: slide 83-end of basics.pdf |
* Demo and codewalk of csp-dining-philosophers.go | * Demo and codewalk of csp-dining-philosophers.go | ||
* Go language features highlighted: | * Go language features highlighted: | ||
Line 27: | Line 27: | ||
* for philosophers to enter/leave -- at most 4 at a time to prevent deadlocking, | * for philosophers to enter/leave -- at most 4 at a time to prevent deadlocking, | ||
* forks (communicate with philosophers over channels) | * forks (communicate with philosophers over channels) | ||
- | * philosophers (communicate with forks over channels) | + | * philosophers (communicate with forks over channels) |
+ | * Demo and codewalk: Sieve of Eratosthenes (Prime Number Sieve) | ||
+ | * copy the sample code from my directory to yours: | ||
+ | * cd into the directory where you have your sample Go code | ||
+ | * '' | ||
+ | * Go language features highlighted: | ||
+ | * Only one looping construct in Go: for loop | ||
+ | * all three parts are optional: init statement, conditional expression, post statement | ||
+ | * channel declarations in function headers | ||
+ | * can specify syntactically whether channel is for reading from (''< | ||
+ |