Skip to content

Commit e956950

Browse files
Version Packages (#5753)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent d2b68ac commit e956950

File tree

5 files changed

+52
-54
lines changed

5 files changed

+52
-54
lines changed

.changeset/gold-swans-camp.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/witty-jokes-lead.md

Lines changed: 0 additions & 47 deletions
This file was deleted.

packages/effect/CHANGELOG.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,55 @@
11
# effect
22

3+
## 3.19.4
4+
5+
### Patch Changes
6+
7+
- [#5752](https://github.com/Effect-TS/effect/pull/5752) [`f445b87`](https://github.com/Effect-TS/effect/commit/f445b87bab342188a5c223cfc76c697d65594d1d) Thanks @janglad! - Fix Types.DeepMutable mapping over functions
8+
9+
- [#5757](https://github.com/Effect-TS/effect/pull/5757) [`d2b68ac`](https://github.com/Effect-TS/effect/commit/d2b68ac9e1ac1d58d7387715843c448195f14675) Thanks @tim-smart! - add experimental PartitionedSemaphore module
10+
11+
A `PartitionedSemaphore` is a concurrency primitive that can be used to
12+
control concurrent access to a resource across multiple partitions identified
13+
by keys.
14+
15+
The total number of permits is shared across all partitions, with waiting
16+
permits equally distributed among partitions using a round-robin strategy.
17+
18+
This is useful when you want to limit the total number of concurrent accesses
19+
to a resource, while still allowing for fair distribution of access across
20+
different partitions.
21+
22+
```ts
23+
import { Effect, PartitionedSemaphore } from "effect"
24+
25+
Effect.gen(function* () {
26+
const semaphore = yield* PartitionedSemaphore.make<string>({ permits: 5 })
27+
28+
// Take the first 5 permits with key "A", then the following permits will be
29+
// equally distributed between all the keys using a round-robin strategy
30+
yield* Effect.log("A").pipe(
31+
Effect.delay(1000),
32+
semaphore.withPermits("A", 1),
33+
Effect.replicateEffect(15, { concurrency: "unbounded" }),
34+
Effect.fork
35+
)
36+
yield* Effect.log("B").pipe(
37+
Effect.delay(1000),
38+
semaphore.withPermits("B", 1),
39+
Effect.replicateEffect(10, { concurrency: "unbounded" }),
40+
Effect.fork
41+
)
42+
yield* Effect.log("C").pipe(
43+
Effect.delay(1000),
44+
semaphore.withPermits("C", 1),
45+
Effect.replicateEffect(10, { concurrency: "unbounded" }),
46+
Effect.fork
47+
)
48+
49+
return yield* Effect.never
50+
}).pipe(Effect.runFork)
51+
```
52+
353
## 3.19.3
454

555
### Patch Changes

packages/effect/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "effect",
3-
"version": "3.19.3",
3+
"version": "3.19.4",
44
"type": "module",
55
"license": "MIT",
66
"description": "The missing standard library for TypeScript, for writing production-grade software.",

packages/effect/src/internal/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
let moduleVersion = "3.19.3"
1+
let moduleVersion = "3.19.4"
22

33
export const getCurrentVersion = () => moduleVersion
44

0 commit comments

Comments
 (0)