tech
Mac: Slowing Down Your Disk Speed by 60x
Use macOS's built-in tool `dmc` to simulate slow disk performance for testing. It offers various profiles to adjust speed easily.
tech
Use macOS's built-in tool `dmc` to simulate slow disk performance for testing. It offers various profiles to adjust speed easily.
tech
Effective Usage and Common Pitfalls
tech
本文介绍了Go语言中的runtime.SetFinalizer函数,探讨了如何在对象被垃圾回收之前执行清理操作。通过示例代码,展示了SetFinalizer的用法及其潜在问题,如内存泄漏和对象生命周期延长。文章还提到在实际应用中,SetFinalizer的使用较少,但在Go源码中有广泛应用,提供了对资源管理的深刻见解。
tech
如何在 Go 中避免内存泄露?关注关闭文件、HTTP 响应体、字符串管理及 goroutine 使用。及时释放资源,避免循环引用,使用 defer 时要小心,助你写出健壮的代码!#GoLang #内存泄露
tech
In the previous article, I implemented a simple RPC interface using the net/rpc package and tried out the Gob encoding that comes with net/rpc and JSON encoding to learn some basics of Golang RPC. In this post, I'll combine net/rpc with protobuf and create my
tech
A Streamlined Approach to Managing Terminal Sessions
tech
十分钟学会 tmux 的使用
tech
Performance Implications of Memory Escaping in Go Programming
tech
RPC是远程过程调用的简称,是分布式系统中不同节点间流行的通信方式。是互联网时代的基石技术,Go语言的标准库也提供了一个简单的RPC实现,Go语言的RPC包的路径为net/rpc,本篇文章的目的是利用net/rpc 实现一个简单的RPC 接口,帮助我们拨开RPC 的迷雾。 对 net/rpc 而言,一个函数需要能够被远程调用,需要满足如下五个条件: * the method’s type is exported. * the method is exported. * the method has two arguments, both exported (or builtin) types. * the method’s second argument is a pointer. * the method has return
tech
在上一篇文章中,我用net/rpc 包实现了一个简单的 RPC接口,并且尝试了net/rpc自带的Gob编码以及JSON编码,学习了Golang RPC 的一些基本知识。本篇文章,我会将net/rpc 跟 protobuf结合起来,然后在了解一下如何使用Protobuf + 插件 生成 gRPC 的代码。 最后会尝试创建一个自己的protobuf插件来帮助我们生成代码,开始吧。 This article was first published in the Medium MPP plan. If you are a Medium user, please follow me on Medium. Thank you very much. 我们在工作过程中一定使用过gRPC + protobuf ,但是它们两个并不是绑定关系,
tech
Learn to implement a simple RPC interface in Go using the `net/rpc` package! 🚀 This article covers the basics and JSON encoding. Read more: https://dev.to/huizhou92/rpc-action-ep1-implement-a-simple-rpc-interface-in-go-1m96
go
Go编程中内存逃逸的性能影响