File tree Expand file tree Collapse file tree 1 file changed +3
-31
lines changed Expand file tree Collapse file tree 1 file changed +3
-31
lines changed Original file line number Diff line number Diff line change @@ -227,49 +227,21 @@ Able to use threading to create and handle threads.
227
227
` ` ` rust
228
228
给 cx 以 程心 ();
229
229
230
- 给 星环公司 以 法则(name, y, limit) {
231
- 给 掩体纪年 以 y;
232
- 面壁 (掩体纪年 < = limit) {
233
- 冬眠(1000);
234
- 广播([name, 掩体纪年]);
235
- 掩体纪年 = 掩体纪年 + 1;
236
- }
237
- }
238
-
239
230
cx.thread(星环公司, [" 掩体工程" , 0, 11])
240
- 冬眠(5000)
241
231
cx.thread(星环公司, [" 研制曲率飞船" , 5, 11])
242
- 冬眠(6000)
243
-
244
- // > [" 掩体工程" , 0]
245
- // ...
246
- // > [" 研制曲率飞船" , 5]
247
- // > [" 掩体工程" , 5]
248
- // > [" 研制曲率飞船" , 6]
249
- // > [" 掩体工程" , 6]
250
232
` ` `
251
233
252
234
# ### Threads Await
253
235
254
236
` ` ` rust
255
237
给 cx 以 程心 ();
256
238
257
- 给 星环公司 以 法则(name, y, limit) {
258
- 给 掩体纪年 以 y;
259
- 面壁 (掩体纪年 < = limit) {
260
- 冬眠(1000);
261
- 广播([name, 掩体纪年]);
262
- 掩体纪年 = 掩体纪年 + 1;
263
- }
264
- }
265
-
266
- 给 秘密研究 以 cx.thread(星环公司, [" 重启光速飞船的研究" , 11, 66])
239
+ 给 秘密研究 以 cx.thread(星环公司, [" 重启光速飞船的研究" , 11, 66]);
267
240
cx.join(秘密研究)
268
-
269
- // > [" 重启光速飞船的研究" , 11]
270
- // > [" 重启光速飞船的研究" , 12]
271
241
` ` `
272
242
243
+ ⚛️ Example threading of " 星环公司" in [runs/11302243115](https://github.com/rustq/3body-lang/actions/runs/11302243115/job/31437809217)
244
+
273
245
# # 🤗 LLM
274
246
275
247
三体编程语言可以通过 " 智子工程" 加载本地大语言模型进行推理。
You can’t perform that action at this time.
0 commit comments