07 2020 档案

摘要:python线程、进程、协程 python的GIL GIL简介 python的GIL的全程是global interpreterer lock(全局解释器锁) 在cpython中,python的一个线程对应c语言的一个线程,早期一些历史原因,GIL使得在一个进程中的一个时间点上只有一个线程在执行py 阅读全文
posted @ 2020-07-30 17:32 Ivy丶 阅读(373) 评论(0) 推荐(0)
摘要:go Context 如何在一个goroutine中去通知其他的goroutine退出任务 package main import ( "context" "fmt" "time" ) func test1(ctx context.Context) { Block: for { select { c 阅读全文
posted @ 2020-07-24 11:02 Ivy丶 阅读(298) 评论(0) 推荐(0)
摘要:golang中使用数据校验功能 安装第三方模块 go get gopkg.in/go-playground/validator.v9 基本使用 package main import ( "fmt" "gopkg.in/go-playground/validator.v9" ) type User 阅读全文
posted @ 2020-07-22 16:34 Ivy丶 阅读(1600) 评论(0) 推荐(0)
摘要:goland中json的序列化和反序列化 转换规则 golang中提供了标准库来实现了json的处理,其对应的转换规则如下 golang json bool Boolean int float Number string string struct object array slice array 阅读全文
posted @ 2020-07-22 11:19 Ivy丶 阅读(732) 评论(0) 推荐(0)

点击右上角即可分享
微信分享提示