- 浏览: 721719 次
- 性别:
- 来自: 深圳
文章分类
- 全部博客 (1043)
- 数据结构 (36)
- UML与设计模式 (42)
- c++ (87)
- rust (36)
- Qt (41)
- boost模板元编程 (43)
- Linux (77)
- 汇编 (4)
- 其它 (2)
- 烹饪 (3)
- unix c / socket (73)
- 软件工程 (4)
- shell (52)
- Python (37)
- c++ primer 5th(c++11) (22)
- 数据库/MySQL (27)
- 数据存储 (4)
- lisp (7)
- git (4)
- Utility (3)
- CDN与DNS (54)
- Http (53)
- php (7)
- nginx/lua/openresty (41)
- redis (11)
- TCP/IP (16)
- 互联网 (6)
- kernel (2)
- go (34)
- 区块链 (43)
- 比特股 (13)
- 以太坊 (23)
- 比特币 (23)
- 密码学 (10)
- EOS (53)
- DAG (1)
- docker (1)
- filecoin (7)
- solidity (64)
- ipfs (8)
- 零知识证明 (1)
- openzeppelin (3)
- java (1)
- defi (7)
最新评论
local t = {} local function produce_thread() for i=1,5 do t[i] = i ngx.say("produce:",i) ngx.sleep(0.01) end end local function consume_thread() for i=1,5 do for k,v in pairs(t) do if t[k] ~= 0 then ngx.say("consume:",t[k]) t[k] = 0 end end ngx.sleep(0.03) end end local tp, err = ngx.thread.spawn(produce_thread) if not tp then ngx.say("failed to create produce thread: ", err) return end local tc, err = ngx.thread.spawn(consume_thread) if not tc then ngx.say("failed to create consume thread: ", err) return end local ok, res = ngx.thread.wait(tp, tc) if not ok then ngx.say("failed to wait: ", res) return end produce:1 consume:1 produce:2 produce:3 consume:2 consume:3 produce:4 produce:5 consume:4 consume:5
发表评论
-
mac nginx启动
2021-01-15 10:10 312brew services start nginx 1.1 ... -
nginx与lvs的异同
2017-11-30 11:51 872http://blog.csdn.net/BuquTianya ... -
lua weak表与gc
2017-11-29 09:56 521local a = {} local b = {} s ... -
lua single-method
2017-11-29 09:49 480local function newObject (val ... -
lua ffi
2017-11-16 11:33 555testlib.c #include <stdio. ... -
lua unpack
2017-11-09 11:07 352unpack接受一个数组作为输入参数,返回数组的所有元素。被用 ... -
resty 正则
2017-07-04 17:32 428local m, err = ngx.re.match(& ... -
Nginx Lua脚本执行顺序
2017-06-15 09:11 777[img] [/img] -
ngx timer
2017-05-20 08:11 430local delay=3 local handle ... -
openresty文件自适应
2017-05-18 14:14 441location ~ ^/([-_a-zA-Z0-9/]+ ... -
lua_shared_dict
2017-05-18 12:01 21841.定义一块名为my_cache的共享内存空间,内存大小为si ... -
lua 协程(coroutine)
2016-11-30 10:34 475local function f(a) local ... -
lua loadstring
2016-11-29 10:08 786loadstring 不会有边界效应产生,他仅仅编译 chun ... -
lua book
2016-05-05 10:26 423http://lua.ren/topic/157/lua书 -
lrucache
2016-04-19 16:21 559local _M = {} --local lruc ... -
openresty资料
2016-03-15 09:57 479视频 http://study.163.com/course/ ... -
openresty缓存
2016-03-09 15:12 1092shared dict:这个cache是nginx所有work ... -
cjson
2016-03-07 10:42 532local json = require("cj ... -
nginx使用lua文件
2016-03-02 10:13 650location /test_var { con ... -
获取 uri 参数
2016-02-23 11:38 382location /test { c ...
相关推荐
resty最新代码resty最新代码resty最新代码resty最新代码resty最新代码resty最新代码resty最新代码resty最新代码resty最新代码resty最新代码resty最新代码resty最新代码resty最新代码resty最新代码resty最新代码resty...
开源项目-go-resty-resty.zip,go-resty: simple HTTP and REST client library
而lua-resty-template和大多数模板引擎是类似的,大体内容有: 模板位置:从哪里查找模板; 变量输出/转义:变量值输出; 代码片段:执行代码片段,完成如if/else、for等复杂逻辑,调用对象函数/方法; 注释:解释...
cd lua-resty-redis 执行 make install cp dkjson.lua /usr/local/lib/lua
lua-resty-redis-connector-master lua-resty的redis库 lua-resty的redis库
eclipse中引用resty jar包,配合截图中调用方法,即可实现发送post及get请求进行接口测试。
lua-resty-mongol-master已编译,直接放在window/linux相应的openresty下的resty目录即可
lua-resty-nettle, LuaJIT FFI的绑定( 低级加密库) lua-resty-nettle针对荨麻疹( 低级别加密库)的LuaJIT FFI绑定概要local require = requirelocal print = printlocal gsub = string.g
resty.http资源
awesome-resty, 质量OpenResty库的列表和资源 的restyopenresty/Nginx 模块,Lua库和相关资源的列表。什么是 OpenResty OpenResty是一个完整的web平台,集成了标准的Nginx 核心。LuaJIT 。许多精心编写的Lua库。许多...
lua-resty-test, 在Openresty上,基于ngx_lua的测试框架 电子邮件名称基于Openresty的lua-resty-test Ngx_lua测试框架#Description 这里Lua库是测试ngx_lua源或者它的他服务器( tcp或者 udp )的测试框架:...
lua-resty-lrucache, 在 LuaJIT FFI上,基于Lua缓存 电子邮件名称lua-resty-lrucache - 基于 LuaJIT FFI的land缓存目录NAME状态概要说明描述方法新插件设置 。删除先决条件安装工具待办事项社区服务英文邮件列表中文...
lua-resty-mongol_openresty连接mongoldb的lua库。 纯lua实现
lua-resty-core, 新的基于 lua Nginx 模块的API 电子邮件名称lua-resty-core - 用于ngx_http_lua_module和/或者ngx_stream_lua_module的基于new的Lua table-内容名称状态概要说明描述先决条件API实现了r
lua-resty-consul, 库与ngx_lua中的consul接口的接口 lua-resty-consul库与ngx_lua中的consul接口的接口目录概述依赖项方法新插件 。get_decodedget_json_decoded把了删除get_client_body_reader