Difference between revisions of "Loop"
Jump to navigation
Jump to search
↑ http://www.golangpatterns.info/concurrency/parallel-for-loop
Tags: Mobile web edit, Mobile edit |
|||
Line 33: | Line 33: | ||
== Related terms == | == Related terms == | ||
* <code>[[for]]</code> | * <code>[[for]]</code> | ||
− | + | * <code>[[/dev/loop]]#</code> | |
== See also == | == See also == |
Revision as of 05:47, 1 September 2020
Infinite loop
package main import "fmt" func main() { sum := 0 for { sum++ 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
Related terms
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
Advertising: