@thi.ng/fibers 0.6.25 → 0.6.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/README.md +7 -0
  3. package/package.json +12 -11
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2024-03-01T15:22:50Z
3
+ - **Last updated**: 2024-03-07T20:40:47Z
4
4
  - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
5
 
6
6
  All notable changes to this project will be documented in this file.
package/README.md CHANGED
@@ -246,6 +246,9 @@ or write to a channel.
246
246
  Channels can be created like so:
247
247
 
248
248
  ```ts
249
+ import { channel, sliding } from "@thi.ng/fibers";
250
+ import { ConsoleLogger } from "@thi.ng/logger";
251
+
249
252
  // create unbuffered channel with single value capacity
250
253
  const chan1 = channel();
251
254
 
@@ -348,6 +351,10 @@ fibers, the various channel operations can be already combined with the
348
351
  For example, a channel read or write op can be combined with a timeout:
349
352
 
350
353
  ```ts
354
+ import { withTimeout } from "@thi.ng/fibers";
355
+
356
+ // ...then, inside a fiber function...
357
+
351
358
  const res = (yield* withTimeout(chan.read(), 1000)).deref();
352
359
  if (res !== undefined) {
353
360
  console.log("read value", x);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/fibers",
3
- "version": "0.6.25",
3
+ "version": "0.6.27",
4
4
  "description": "Process hierarchies & operators for cooperative multitasking",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -32,17 +32,18 @@
32
32
  "doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
33
33
  "doc:readme": "bun ../../tools/src/module-stats.ts && bun ../../tools/src/readme.ts",
34
34
  "pub": "yarn npm publish --access public",
35
- "test": "bun test"
35
+ "test": "bun test",
36
+ "tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
36
37
  },
37
38
  "dependencies": {
38
- "@thi.ng/api": "^8.9.27",
39
- "@thi.ng/arrays": "^2.8.4",
40
- "@thi.ng/bench": "^3.4.30",
41
- "@thi.ng/checks": "^3.5.1",
42
- "@thi.ng/errors": "^2.4.19",
43
- "@thi.ng/idgen": "^2.2.30",
44
- "@thi.ng/logger": "^3.0.4",
45
- "@thi.ng/random": "^3.6.34"
39
+ "@thi.ng/api": "^8.9.28",
40
+ "@thi.ng/arrays": "^2.8.6",
41
+ "@thi.ng/bench": "^3.4.32",
42
+ "@thi.ng/checks": "^3.5.2",
43
+ "@thi.ng/errors": "^2.4.20",
44
+ "@thi.ng/idgen": "^2.2.32",
45
+ "@thi.ng/logger": "^3.0.5",
46
+ "@thi.ng/random": "^3.6.35"
46
47
  },
47
48
  "devDependencies": {
48
49
  "@microsoft/api-extractor": "^7.40.1",
@@ -108,5 +109,5 @@
108
109
  "status": "alpha",
109
110
  "year": 2023
110
111
  },
111
- "gitHead": "d660ae8fd1bf64d919b4334f19509f1f539d70f6\n"
112
+ "gitHead": "a421058a65ba76608d94129ac29451bfedaf201c\n"
112
113
  }