farce 0.3.0-java → 0.4.1-java

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 (40) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +50 -0
  3. data/README.md +117 -1489
  4. data/docs/compatibility.md +74 -0
  5. data/docs/concurrency.md +151 -0
  6. data/docs/data-structures.md +313 -0
  7. data/docs/installation.md +63 -0
  8. data/docs/integrations.md +124 -0
  9. data/docs/introduction.md +266 -0
  10. data/docs/scheduling.md +176 -0
  11. data/docs/sharing.md +211 -0
  12. data/docs/shims.md +144 -0
  13. data/docs/utilities.md +93 -0
  14. data/docs/variants-and-scopes.md +92 -0
  15. data/lib/farce/abstract/flag.rb +6 -0
  16. data/lib/farce/backports.rb +274 -0
  17. data/lib/farce/engine/jruby/fiber_scheduler.rb +3 -0
  18. data/lib/farce/engine/jruby/scheduler_synchronization.rb +87 -0
  19. data/lib/farce/engine/ruby/3.4/null_port.rb +21 -0
  20. data/lib/farce/engine/ruby/3.4/patch.rb +67 -0
  21. data/lib/farce/engine/ruby/3.4/port.rb +13 -12
  22. data/lib/farce/engine/ruby/3.4/ractor_methods.rb +0 -1
  23. data/lib/farce/engine/ruby/4.0/null_port.rb +36 -0
  24. data/lib/farce/engine/ruby/4.0/port.rb +1 -2
  25. data/lib/farce/engine/ruby/4.1/null_port.rb +5 -0
  26. data/lib/farce/engine/ruby.rb +7 -0
  27. data/lib/farce/engine/shared/null_port.rb +18 -0
  28. data/lib/farce/engine/shared/port.rb +41 -3
  29. data/lib/farce/engine/shared/queue.rb +4 -4
  30. data/lib/farce/engine/shared/ractor_methods.rb +2 -2
  31. data/lib/farce/engine/shared/ractor_selector.rb +73 -0
  32. data/lib/farce/extension.rb +150 -0
  33. data/lib/farce/integrations/ractor_tmvar.rb +4 -1
  34. data/lib/farce/internal/fake_ractor.rb +10 -2
  35. data/lib/farce/internal/scheduler_lifecycle.rb +7 -4
  36. data/lib/farce/null_port.rb +12 -0
  37. data/lib/farce/system.rb +10 -2
  38. data/lib/farce/version.rb +1 -1
  39. data/lib/farce.rb +1 -1
  40. metadata +23 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c9b0343e3118788fe19bd34a9908d02e6f8292cace0f2bf39ffc6ce03577aac6
4
- data.tar.gz: bfd0b8442a6e5eb0b5b94b6c461824e079d6df8ba67339c58cdf5d726463cfcc
3
+ metadata.gz: f31bf2a3443ed0a7caa213a2a3d7a5bfcca082e3a1e0c2c48d19284e1c778155
4
+ data.tar.gz: 152c001cb2bc79b2f4952d8c90c4b378a67d1471105857a62b88dfc22313ae92
5
5
  SHA512:
6
- metadata.gz: 6249b5c3d01d422f762f9b04bd8133bf0f92db96b7830be04c4601ec8afdf0142f9eaf43e0563dcffd114d89bce8fd1588f057e451b246727ff08e8546439399
7
- data.tar.gz: 96ff4d0b617780cfa08114bc6ba09e531b26214c70109a46f05ad184b149fd3ffa2487213eb725614fa102f9adbf41de01e0ede02faa3c82fa7e439842d68598
6
+ metadata.gz: e50924162322d2fe1204c2a151d04556b666a79abc1491aaf5e6b3652f6bce1cab389b3a1adcf6ad1f622a30370e3489ef0996b6953298dba06fae601ec0da82
7
+ data.tar.gz: 74d3aaef616ff99d38649401d4302a2172b3ac42d03d04dd6b71a255ba95fdb6f972bb208d70ebc17c04614533a03ef684576e003e47138abe4929f1a92a0468
data/CHANGELOG.md CHANGED
@@ -4,6 +4,56 @@ Farce follows [Semantic Versioning 2.0](http://semver.org/). Any public method o
4
4
 
5
5
  ## Development Releases
6
6
 
7
+ ### Farce 0.4.1 (2026-10-16)
8
+
9
+ * Make sure prebuilt Linux binaries include liburing support.
10
+ * Use a Futex for efficient fiber synchronization if possible.
11
+ * Consistent `wrap_struct_name` across the native extension for debugging.
12
+
13
+ ### Farce 0.4.0 (2026-10-16)
14
+
15
+ #### New Features
16
+
17
+ ##### Ractor Backports
18
+
19
+ `Farce::Backports` makes newer Ractor APIs available on older Ruby versions:
20
+
21
+ * Added `Ractor#default_port`, `#join`, `#monitor`, `#unmonitor`, and `#value` on Ruby versions prior to 4.0.
22
+ * Added `Ractor#alive?` on Ruby versions prior to 4.1.
23
+ * Added optional `timeout:` support for `Ractor.select`, `Ractor#receive`, and `Ractor::Port#receive` on Ruby versions prior to 4.1.
24
+
25
+ You can activate the backports for a lexical scope with `using Farce::Backports`, install them globally with `Farce::Backports.install`, or call methods on `Farce::Backports` directly.
26
+ Global installation also defines `Ractor` and `Ractor::Port` when they are not natively available.
27
+
28
+ ```ruby
29
+ using Farce::Backports
30
+
31
+ ractor = Farce::Ractor.new { 42 }
32
+ ractor.join
33
+ ractor.value # => 42
34
+ ```
35
+
36
+ ##### Ractor Improvements
37
+
38
+ * `Farce::Ractor.select` is now implemented on JRuby and TruffleRuby. It supports selecting from Ractors and ports, optional timeouts, and waiting without blocking a Fiber scheduler.
39
+ * The Ractor polyfill now supports `alive?` and follows Ruby 4.1's `monitor` notification format when running on Ruby 4.1 or later.
40
+
41
+ ##### Miscellaneous
42
+
43
+ * Added `set?` and `unset?` predicates to `Flag` and `Local::Flag`.
44
+ * Added `Farce::NULL_PORT`, a write-only port that discards messages and can be used to ignore Ractor exit notifications.
45
+ * Added `Farce::System.ruby_version`, which returns the current Ruby release as a version object without prerelease suffixes. It can be called from any Ractor.
46
+ * Added `Farce::Extension` to easily define modules that can be used both as refinements or installed globally into existing classes, used by `Farce::Backports`.
47
+
48
+ #### Bug Fixes
49
+
50
+ * Work around a JRuby synchronization race that could lose a mutex wakeup and leave a scheduled Fiber blocked.
51
+
52
+ #### Other changes
53
+
54
+ * Reorganized the README into a shorter introduction with topic-specific guides in the docs directory.
55
+ * Updated compatibility documentation and tests for `ractor-tmvar` 0.4.0.
56
+
7
57
  ### Farce 0.3.0 (2026-10-13)
8
58
 
9
59
  #### New Features