上一页 1 2 3 4 5 6 7 8 ··· 12 下一页

2023年3月8日

异步,同步,阻塞,非阻塞 4句话表达

摘要: 同步:实时同步全过程,连续做几件事,从头到尾不管用多少时间,最后得到一个结果 (单人做战) 异步:异步状态跟踪,对于耗时较久的工作可以让别人去做(或者自己有时间再做),自己不关注过程,有结果通知自己就好 (多人做战) 阻塞:堵门,自己要的鸡蛋灌饼还没有做好,我就堵门等,后面人买烧饼(虽然有现货)对不 阅读全文

posted @ 2023-03-08 14:37 hztech 阅读(31) 评论(0) 推荐(0)

2023年3月7日

Lua 垃圾回收

摘要: Lua 内存垃圾回收,是自动完成的,不需要人工处理。 垃圾回收有两种模式: 1、增量式(Incremental) 有三个参数 1)、garbage-collector pause, 什么时间执行,比上次回收后内增加的比例 默认200% 最大1000% 2)、garbage-collector ste 阅读全文

posted @ 2023-03-07 15:30 hztech 阅读(367) 评论(0) 推荐(0)

Lua 学习-10 元表metaTable

摘要: 2.4 – Metatables and Metamethods Every value in Lua can have a metatable. This metatable is an ordinary Lua table that defines the behavior of the ori 阅读全文

posted @ 2023-03-07 13:34 hztech 阅读(50) 评论(0) 推荐(0)

2023年3月5日

Luau学习--8 Function call 函数

摘要: 2.5.8 – Function Calls A function call in Lua has the following syntax: functioncall ::= prefixexp args In a function call, first prefixexp and args a 阅读全文

posted @ 2023-03-05 15:43 hztech 阅读(238) 评论(0) 推荐(0)

Lua--学习--7 Table 构建

摘要: 2.5.7 – Table Constructors Table constructors are expressions that create tables. Every time a constructor is evaluated, a new table is created. A con 阅读全文

posted @ 2023-03-05 13:31 hztech 阅读(58) 评论(0) 推荐(0)

Lua 学习--6 运算

摘要: 2.5.1 – Arithmetic Operators Lua supports the usual arithmetic operators: the binary + (addition), - (subtraction), * (multiplication), / (division),  阅读全文

posted @ 2023-03-05 11:31 hztech 阅读(25) 评论(0) 推荐(0)

Lua学习--5 表达式

摘要: 2.5 – Expressions The basic expressions in Lua are the following: exp ::= prefixexp exp ::= nil | false | true exp ::= Number exp ::= String exp ::= f 阅读全文

posted @ 2023-03-05 11:00 hztech 阅读(46) 评论(0) 推荐(0)

2023年3月4日

Lua学习--4

摘要: 结构控制 2.4.4 – Control Structures The control structures if, while, and repeat have the usual meaning and familiar syntax: stat ::= while exp do block e 阅读全文

posted @ 2023-03-04 22:43 hztech 阅读(31) 评论(0) 推荐(0)

Lua学习--3

摘要: 变量 Variables are places that store values. There are three kinds of variables in Lua: global variables, local variables, and table fields. A single na 阅读全文

posted @ 2023-03-04 22:20 hztech 阅读(27) 评论(0) 推荐(0)

Lua 学习---2

摘要: 值和类型 Lua is a dynamically typed language. This means that variables do not have types; only values do. There are no type definitions in the language. 阅读全文

posted @ 2023-03-04 17:57 hztech 阅读(41) 评论(0) 推荐(0)

上一页 1 2 3 4 5 6 7 8 ··· 12 下一页

导航