GoLang
xxxxxxxxxx
package main
import (
"fmt"
"time"
)
func main() {
c1 := make(chan string, 1)
go func() {
time.Sleep(2 * time.Second)
c1 <- "result 1"
}()
select {
case res := <-c1:
fmt.Println(res)
case <-time.After(1 * time.Second):
fmt.Println("timeout 1")
}
c2 := make(chan string, 1)
go func() {
time.Sleep(2 * time.Second)
c2 <- "result 2"
}()
select {
case res := <-c2:
fmt.Println(res)
case <-time.After(3 * time.Second):
fmt.Println("timeout 2")
}
}
timeout 1 result 2
Linux - anc-api-tools ని ఎలా ఇన్స్టాల్ చేయాలి
Linux - curvedns ని ఎలా ఇన్స్టాల్ చేయాలి
Python - సంఖ్య సానుకూలంగా ఉందా, ప్రతికూలంగా ఉందా లేదా 0 అని తనిఖీ చేయండి
Linux - zenmap ని ఎలా ఇన్స్టాల్ చేయాలి
C - పూర్ణాంకంలో అంకెల సంఖ్యను లెక్కించండి
C++ - లీప్ ఇయర్ని తనిఖీ చేయండి
JavaScript - స్ట్రింగ్ కొన్ని అక్షరాలతో ప్రారంభమై ముగుస్తుందో లేదో తనిఖీ చేయండి
C++ - సంఖ్య ప్రధానమైనదా కాదా అని తనిఖీ చేయండి
C - డైనమిక్ మెమరీ కేటాయింపును ఉపయోగించి అతిపెద్ద సంఖ్యను కనుగొనండి
Linux - xbitmaps ని ఎలా ఇన్స్టాల్ చేయాలి
Kotlin - ఒక సంఖ్యను n దశాంశ స్థానాలకు రౌండ్ చేయండి
Linux - zstd ని ఎలా ఇన్స్టాల్ చేయాలి
Kotlin - ఒక సంఖ్యను రివర్స్ చేయండి
Kotlin - సంఖ్య యొక్క కారకాన్ని కనుగొనండి
Linux - zfs-test ని ఎలా ఇన్స్టాల్ చేయాలి
Java - ఒక సంఖ్యను రివర్స్ చేయండి
Kotlin - సహజ సంఖ్యల మొత్తాన్ని లెక్కించండి
Linux - zita-ajbridge ని ఎలా ఇన్స్టాల్ చేయాలి
We have been online since 2021 and 1 millions of people around the globe have visited our website since then
More visitors every month