Telegram Group & Telegram Channel
Note #66: Go плайграунд теперь исполняет код в multi-threaded linux контейнере

Если у вас есть необходимость в демонстрации многопоточного кода на Go, который использует несколько горутин и которые, в свою очередь, используют один поток (thread) операционной системы или несколько потоков (threads), которые используют разные ядра. В общем теперь можно изучать go параллелизм в плайграунде 🙌

package main

import (
"fmt"
"runtime"
)

func main() {
fmt.Printf("GOOS[%s] GOARCH[%s] GOMAXPROCS[%d] NumCPU[%d]", runtime.GOOS, runtime.GOARCH, runtime.GOMAXPROCS(0), runtime.NumCPU())
}
// OOS[linux] GOARCH[amd64] GOMAXPROCS[8] NumCPU[8]


P.S. объяснение от Брэда Фицпатрика:
Это стало возможным после того, как удалили поддержку Native Client (GOOS=nacl) в Go 1.14, и теперь go плайграунд запускается с помощью gVisor.
https://github.com/golang/go/issues/25224
https://github.com/golang/playground/commit/4d362417fd14b0b8349150cb28c3e8f2e756932e



tg-me.com/golang_for_two/92
Create:
Last Update:

Note #66: Go плайграунд теперь исполняет код в multi-threaded linux контейнере

Если у вас есть необходимость в демонстрации многопоточного кода на Go, который использует несколько горутин и которые, в свою очередь, используют один поток (thread) операционной системы или несколько потоков (threads), которые используют разные ядра. В общем теперь можно изучать go параллелизм в плайграунде 🙌

package main

import (
"fmt"
"runtime"
)

func main() {
fmt.Printf("GOOS[%s] GOARCH[%s] GOMAXPROCS[%d] NumCPU[%d]", runtime.GOOS, runtime.GOARCH, runtime.GOMAXPROCS(0), runtime.NumCPU())
}
// OOS[linux] GOARCH[amd64] GOMAXPROCS[8] NumCPU[8]


P.S. объяснение от Брэда Фицпатрика:
Это стало возможным после того, как удалили поддержку Native Client (GOOS=nacl) в Go 1.14, и теперь go плайграунд запускается с помощью gVisor.
https://github.com/golang/go/issues/25224
https://github.com/golang/playground/commit/4d362417fd14b0b8349150cb28c3e8f2e756932e

BY 🇺🇦 Go for two :)


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/golang_for_two/92

View MORE
Open in Telegram


🇺🇦 Go на двоих Telegram | DID YOU KNOW?

Date: |

However, analysts are positive on the stock now. “We have seen a huge downside movement in the stock due to the central electricity regulatory commission’s (CERC) order that seems to be negative from 2014-15 onwards but we cannot take a linear negative view on the stock and further downside movement on the stock is unlikely. Currently stock is underpriced. Investors can bet on it for a longer horizon," said Vivek Gupta, director research at CapitalVia Global Research.

How to Use Bitcoin?

n the U.S. people generally use Bitcoin as an alternative investment, helping diversify a portfolio apart from stocks and bonds. You can also use Bitcoin to make purchases, but the number of vendors that accept the cryptocurrency is still limited. Big companies that accept Bitcoin include Overstock, AT&T and Twitch. You may also find that some small local retailers or certain websites take Bitcoin, but you’ll have to do some digging. That said, PayPal has announced that it will enable cryptocurrency as a funding source for purchases this year, financing purchases by automatically converting crypto holdings to fiat currency for users. “They have 346 million users and they’re connected to 26 million merchants,” says Spencer Montgomery, founder of Uinta Crypto Consulting. “It’s huge.”

🇺🇦 Go на двоих from us


Telegram 🇺🇦 Go for two :)
FROM USA