fractor 0.1.9 → 0.1.10

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.
@@ -14,8 +14,7 @@ module Fractor
14
14
  # @param kwargs [Hash] Additional keyword arguments for subclass initialization
15
15
  # @return [WrappedRactor] The appropriate subclass instance
16
16
  def self.create(name, worker_class, **kwargs)
17
- ruby_4_0 = Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("4.0.0")
18
- if ruby_4_0
17
+ if Fractor::RUBY_4_0_OR_HIGHER
19
18
  WrappedRactor4.new(name, worker_class, **kwargs)
20
19
  else
21
20
  WrappedRactor3.new(name, worker_class, **kwargs)
@@ -112,9 +111,8 @@ module Fractor
112
111
  end
113
112
 
114
113
  false
115
- rescue Exception => e
114
+ rescue Exception
116
115
  # If we get an exception, the Ractor is likely terminated
117
- puts "Ractor #{@name} appears to be terminated: #{e.message}" if ENV["FRACTOR_DEBUG"]
118
116
  @ractor = nil
119
117
  true
120
118
  end
data/lib/fractor.rb CHANGED
@@ -33,6 +33,8 @@ require_relative "fractor/error_reporter"
33
33
  require_relative "fractor/error_statistics"
34
34
  require_relative "fractor/error_report_generator"
35
35
  require_relative "fractor/error_formatter"
36
+ require_relative "fractor/callback_registry"
37
+ require_relative "fractor/config_schema"
36
38
  require_relative "fractor/execution_tracer"
37
39
  require_relative "fractor/result_cache"
38
40
 
@@ -46,6 +48,15 @@ end
46
48
 
47
49
  # Fractor: Function-driven Ractors framework
48
50
  module Fractor
51
+ # Version check constant - computed once at load time for performance
52
+ # Avoids expensive Gem::Version.new calls in hot paths
53
+ RUBY_4_0_OR_HIGHER = RUBY_VERSION >= "4.0.0"
54
+
55
+ # Windows Ruby 3.4.x check - for platform-specific workarounds
56
+ # This is only relevant on Windows and Ruby 3.4.x
57
+ WINDOWS_RUBY_34 = RUBY_PLATFORM.match?(/mswin|mingw|cygwin/) &&
58
+ RUBY_VERSION >= "3.4.0" && RUBY_VERSION < "3.5.0"
59
+
49
60
  # Exception raised when trying to push to a closed queue
50
61
  class ClosedQueueError < StandardError; end
51
62
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fractor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ronald Tse
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-01-22 00:00:00.000000000 Z
11
+ date: 2026-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logger
@@ -55,8 +55,11 @@ files:
55
55
  - README.adoc
56
56
  - Rakefile
57
57
  - docs/.lycheeignore
58
+ - docs/ARCHITECTURE.md
58
59
  - docs/Gemfile
60
+ - docs/PERFORMANCE_TUNING.md
59
61
  - docs/README.md
62
+ - docs/TROUBLESHOOTING.md
60
63
  - docs/_config.yml
61
64
  - docs/_features/error-handling.adoc
62
65
  - docs/_features/index.adoc
@@ -179,7 +182,9 @@ files:
179
182
  - examples/workflow/simplified/simplified_workflow.rb
180
183
  - exe/fractor
181
184
  - lib/fractor.rb
185
+ - lib/fractor/callback_registry.rb
182
186
  - lib/fractor/cli.rb
187
+ - lib/fractor/config_schema.rb
183
188
  - lib/fractor/configuration.rb
184
189
  - lib/fractor/continuous_server.rb
185
190
  - lib/fractor/error_formatter.rb
@@ -217,6 +222,11 @@ files:
217
222
  - lib/fractor/workflow/circuit_breaker_orchestrator.rb
218
223
  - lib/fractor/workflow/circuit_breaker_registry.rb
219
224
  - lib/fractor/workflow/dead_letter_queue.rb
225
+ - lib/fractor/workflow/execution/dependency_resolver.rb
226
+ - lib/fractor/workflow/execution/fallback_job_handler.rb
227
+ - lib/fractor/workflow/execution/job_executor.rb
228
+ - lib/fractor/workflow/execution/result_builder.rb
229
+ - lib/fractor/workflow/execution/workflow_execution_logger.rb
220
230
  - lib/fractor/workflow/execution_hooks.rb
221
231
  - lib/fractor/workflow/execution_strategy.rb
222
232
  - lib/fractor/workflow/execution_trace.rb