Difference between revisions of "Loop"
Jump to navigation
Jump to search
↑ http://www.golangpatterns.info/concurrency/parallel-for-loop
| Line 13: | Line 13: | ||
</pre> | </pre> | ||
| − | Go do not support parallel for-loops , Sun's [[Fortress]] support it. But they are easy to implement using [[goroutines]].<ref>http://www.golangpatterns.info/concurrency/parallel-for-loop</ref> | + | Go do not support parallel for-loops , deprecated Sun's [[Fortress]] was support it. But they are easy to implement using [[goroutines]].<ref>http://www.golangpatterns.info/concurrency/parallel-for-loop</ref> |
Revision as of 06:47, 29 April 2020
Infinite loop
sum := 0
for {
sum++ // repeated forever
fmt.Println(sum)
}
Go do not support parallel for-loops , deprecated Sun's Fortress was support it. But they are easy to implement using goroutines.[1]
#!/bin/bash while true; do ((var++)) echo $var done
See also
- Programming: C, Python,
go,loop,while,for,if,variable, Error handling, Regex, Function, IDE, await, R (programming language), XACML, Type, Class inheritance, Methods, Scheme, Array, Deserialization, Fortran
Advertising: