随笔分类 -  golang

摘要:oblet - The Go Programming Language https://golang.google.cn/search?q=oblet // put enqueues a pointer for the garbage collector to trace. 174 // obj m 阅读全文
posted @ 2020-11-02 10:35 papering 阅读(162) 评论(0) 推荐(0)
摘要:知乎社区核心业务 Golang 化实践 - 知乎 https://zhuanlan.zhihu.com/p/48039838 阅读全文
posted @ 2020-10-31 22:44 papering 阅读(452) 评论(0) 推荐(0)
摘要:https://github.com/unknwon/the-way-to-go_ZH_CN/blob/master/eBook/08.1.md map 传递给函数的代价很小:在 32 位机器上占 4 个字节,64 位机器上占 8 个字节,无论实际上存储了多少数据。通过 key 在 map 中寻找值 阅读全文
posted @ 2020-10-29 10:08 papering 阅读(147) 评论(0) 推荐(0)
摘要:曹春晖:谈一谈 Go 和 Syscall https://juejin.im/post/6844903845475139597 阅读全文
posted @ 2020-10-27 16:49 papering 阅读(181) 评论(0) 推荐(0)
摘要:为什么 Go 模块在下游服务抖动恢复后,CPU 占用无法恢复 https://xargin.com/cpu-idle-cannot-recover-after-peak-load/ 极端情况下收缩 Go 的线程数 https://www.xargin.com/shrink-go-threads/ 阅读全文
posted @ 2020-10-27 16:43 papering 阅读(108) 评论(0) 推荐(0)
摘要:https://github.com/envoyproxy/protoc-gen-validate This project is currently in alpha. The API should be considered unstable and likely to change PGV i 阅读全文
posted @ 2020-09-23 15:25 papering 阅读(2332) 评论(0) 推荐(0)
摘要:Go Code Review Comments https://golang.org/wiki/CodeReviewComments 阅读全文
posted @ 2020-09-23 10:35 papering 阅读(155) 评论(0) 推荐(0)
摘要:https://mp.weixin.qq.com/s/UVZKFmv8p4ghm8ICdz85wQ Go 如何实现热重启 原创 zhijiezhang 腾讯技术工程 2020-09-09 阅读全文
posted @ 2020-09-09 19:12 papering 阅读(346) 评论(0) 推荐(0)
摘要:17 | 异步RPC:压榨单机吞吐量 https://time.geekbang.org/column/article/216803 这并不是一个新话题,比如现在我们经常提到的响应式开发,就是为了能够提升业务处理的吞吐量。要提升吞吐量,其实关键就两个字:“异步”。我们的 RPC 框架要做到完全异步化 阅读全文
posted @ 2020-07-23 19:29 papering 阅读(645) 评论(0) 推荐(0)
摘要:https://github.com/go-proverbs/go-proverbs.github.io Go Proverbs Simple, Poetic, Pithy Don't communicate by sharing memory, share memory by communicat 阅读全文
posted @ 2020-06-27 23:49 papering 阅读(266) 评论(0) 推荐(0)
摘要:https://mp.weixin.qq.com/s/wSaJYg-HqnYY4SdLA2Zzaw RPC 框架作为研发体系中重要的一环,承载了几乎所有的服务流量。本文将简单介绍字节跳动自研网络库 netpoll 的设计及实践;以及我们实际遇到的问题和解决思路,希望能为大家提供一些参考。 前言 字节 阅读全文
posted @ 2020-05-19 22:00 papering 阅读(832) 评论(0) 推荐(0)
摘要:小结: 1、 Go不需要VM,Go应用程序二进制文件中嵌入了一个小型运行时(Go runtime),可以处理诸如垃圾收集(GC),调度和并发之类的语言功能 Go does not need a VM and Go application binaries include a small runtim 阅读全文
posted @ 2020-03-27 22:36 papering 阅读(289) 评论(0) 推荐(0)
摘要:https://mp.weixin.qq.com/s/I5va3PI1oGIj8R_n3Nw2yw 1115. 交替打印 FooBar - 力扣(LeetCode) https://leetcode.cn/problems/print-foobar-alternately/description/ 阅读全文
posted @ 2020-02-10 12:06 papering 阅读(151) 评论(0) 推荐(0)
摘要:Most basic operations in Go are not synchronized. In other words, they are not concurrency-safe. https://go101.org/article/channel.html 阅读全文
posted @ 2020-01-20 23:36 papering 阅读(244) 评论(0) 推荐(0)
摘要:小结: 1、 When a goroutine sends a value to a channel, we can view the goroutine releases the ownership of some values. When a goroutine receives a value 阅读全文
posted @ 2020-01-20 23:32 papering 阅读(196) 评论(0) 推荐(0)
摘要:How to kill go routine? https://stackoverflow.com/questions/37997608/kill-a-method-in-an-infinite-loop-golang I am working with a piece of code that h 阅读全文
posted @ 2020-01-16 11:17 papering 阅读(517) 评论(0) 推荐(0)
摘要:package main import ( "fmt" "log" "syscall" "unsafe" ) var ( user32 = syscall.MustLoadDLL("user32.dll") procEnumWindows = user32.MustFindProc("EnumWin 阅读全文
posted @ 2020-01-15 17:35 papering 阅读(535) 评论(0) 推荐(0)
摘要:Golang调用windows下的dll动态库中的函数 package main import ( "fmt" "syscall" "time" "unsafe" ) const ( MB_OK = 0x00000000 MB_OKCANCEL = 0x00000001 MB_ABORTRETRYI 阅读全文
posted @ 2020-01-15 12:14 papering 阅读(1403) 评论(0) 推荐(0)
摘要:https://learnku.com/docs/go-blog/qihoo/6532 Use a Task Pool, a mechanism with a group of long-lived goroutines consuming global task or message queues 阅读全文
posted @ 2020-01-11 14:19 papering 阅读(262) 评论(0) 推荐(0)