@thi.ng/fibers 0.6.24 → 0.6.26

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 +8 -12
  3. package/package.json +10 -10
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2024-02-25T14:07:53Z
3
+ - **Last updated**: 2024-03-02T14:05:53Z
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
@@ -1,16 +1,5 @@
1
1
  <!-- This file is generated - DO NOT EDIT! -->
2
2
  <!-- Please see: https://github.com/thi-ng/umbrella/blob/develop/CONTRIBUTING.md#changes-to-readme-files -->
3
- > [!IMPORTANT]
4
- > ‼️ Announcing the thi.ng user survey 2024 📋
5
- >
6
- > [Please participate in the survey here!](https://forms.gle/XacbSDEmQMPZg8197)\
7
- > (open until end of February)
8
- >
9
- > **To achieve a better sample size, I'd highly appreciate if you could
10
- > circulate the link to this survey in your own networks.**
11
- >
12
- > [Discussion](https://github.com/thi-ng/umbrella/discussions/447)
13
-
14
3
  # ![@thi.ng/fibers](https://media.thi.ng/umbrella/banners-20230807/thing-fibers.svg?d08288cb)
15
4
 
16
5
  [![npm version](https://img.shields.io/npm/v/@thi.ng/fibers.svg)](https://www.npmjs.com/package/@thi.ng/fibers)
@@ -22,7 +11,7 @@
22
11
  > of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
23
12
  > and anti-framework.
24
13
  >
25
- > 🚀 Help me to work full-time on these projects by [sponsoring me on
14
+ > 🚀 Please help me to work full-time on these projects by [sponsoring me on
26
15
  > GitHub](https://github.com/sponsors/postspectacular). Thank you! ❤️
27
16
 
28
17
  - [About](#about)
@@ -257,6 +246,9 @@ or write to a channel.
257
246
  Channels can be created like so:
258
247
 
259
248
  ```ts
249
+ import { channel, sliding } from "@thi.ng/fibers";
250
+ import { ConsoleLogger } from "@thi.ng/logger";
251
+
260
252
  // create unbuffered channel with single value capacity
261
253
  const chan1 = channel();
262
254
 
@@ -359,6 +351,10 @@ fibers, the various channel operations can be already combined with the
359
351
  For example, a channel read or write op can be combined with a timeout:
360
352
 
361
353
  ```ts
354
+ import { withTimeout } from "@thi.ng/fibers";
355
+
356
+ // ...then, inside a fiber function...
357
+
362
358
  const res = (yield* withTimeout(chan.read(), 1000)).deref();
363
359
  if (res !== undefined) {
364
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.24",
3
+ "version": "0.6.26",
4
4
  "description": "Process hierarchies & operators for cooperative multitasking",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -35,14 +35,14 @@
35
35
  "test": "bun test"
36
36
  },
37
37
  "dependencies": {
38
- "@thi.ng/api": "^8.9.26",
39
- "@thi.ng/arrays": "^2.8.3",
40
- "@thi.ng/bench": "^3.4.29",
41
- "@thi.ng/checks": "^3.5.0",
42
- "@thi.ng/errors": "^2.4.18",
43
- "@thi.ng/idgen": "^2.2.29",
44
- "@thi.ng/logger": "^3.0.3",
45
- "@thi.ng/random": "^3.6.33"
38
+ "@thi.ng/api": "^8.9.27",
39
+ "@thi.ng/arrays": "^2.8.5",
40
+ "@thi.ng/bench": "^3.4.31",
41
+ "@thi.ng/checks": "^3.5.1",
42
+ "@thi.ng/errors": "^2.4.19",
43
+ "@thi.ng/idgen": "^2.2.31",
44
+ "@thi.ng/logger": "^3.0.4",
45
+ "@thi.ng/random": "^3.6.34"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@microsoft/api-extractor": "^7.40.1",
@@ -108,5 +108,5 @@
108
108
  "status": "alpha",
109
109
  "year": 2023
110
110
  },
111
- "gitHead": "6e20f80dd9df1c8055ffa3c1e4d6f7598add0c0b\n"
111
+ "gitHead": "df9e312af741d87e6b450afcfea6a6e381662b1e\n"
112
112
  }