The NetBSD Project

CVS log for pkgsrc/devel/ruby-async/Makefile

[BACK] Up to [cvs.NetBSD.org] / pkgsrc / devel / ruby-async

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.55: download - view: text, markup, annotated - select for diffs
Thu Sep 24 04:03:44 2026 UTC (7 weeks, 4 days ago) by taca
Branches: MAIN
CVS tags: HEAD
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +2 -2 lines
devel/ruby-async: update to 2.46.0

2.46.0 (2026-09-13)

* Fixed Thread#kill raising a TypeError while shutting down a thread with an
  active Async::Reactor.

Revision 1.54: download - view: text, markup, annotated - select for diffs
Sun Sep 6 14:24:28 2026 UTC (2 months, 1 week ago) by taca
Branches: MAIN
CVS tags: pkgsrc-2026Q3-base, pkgsrc-2026Q3
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +3 -3 lines
devel/ruby-async: update to 2.45.1

2.45.0 (20260-08-26)

* Fixed scheduler I/O and process waits returning prematurely after stale or
  interrupted wake-ups.  I/O waits now preserve their original timeout,
  while blocking process waits retry and non-blocking Process::WNOHANG waits
  still return nil.

2.45.1 (2026-08-28)

* Fixed Scheduler#io_wait returning nil instead of false when an explicit
  timeout expired.  Native callers such as Socket#connect with
  connect_timeout: distinguish a timeout by checking for false, so the nil
  caused TypeError: no implicit conversion from nil to integer instead of
  the intended IO::TimeoutError.

Revision 1.53: download - view: text, markup, annotated - select for diffs
Tue Aug 11 16:01:29 2026 UTC (3 months ago) by taca
Branches: MAIN
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +2 -2 lines
devel/ruby-async: update to 2.44.1

2.44.1 (2026-08-05)

* Improve Async and Sync documentation. (#465)

Revision 1.52: download - view: text, markup, annotated - select for diffs
Tue Aug 4 14:12:05 2026 UTC (3 months, 1 week ago) by taca
Branches: MAIN
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +2 -2 lines
devel/ruby-async: update to 2.44.0

2.44.0 (2026-07-29)

* Fixed scheduler cleanup after forking while other fibers are blocked.

Revision 1.51: download - view: text, markup, annotated - select for diffs
Sun Jul 26 13:59:07 2026 UTC (3 months, 3 weeks ago) by taca
Branches: MAIN
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +2 -4 lines
devel/ruby-async: update to 2.43.0

2.43.0 (2026-07-22)

* Propagate cancellation causes through task trees so child tasks observe
  the original cancellation cause.

Revision 1.50: download - view: text, markup, annotated - select for diffs
Tue Jul 7 13:57:21 2026 UTC (4 months, 1 week ago) by taca
Branches: MAIN
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +2 -2 lines
devel/ruby-async: update to 2.42.0

2.42.0 (2026-07-02)

* Sync and Async can now be invoked from a non-blocking fiber that has no
  scheduler (e.g. inside an Enumerator or a bare Fiber.new).  Previously
  this raised RuntimeError: Running scheduler on non-blocking fiber!.  The
  reactor is now run within Fiber.blocking, so the scheduler always runs on
  a blocking fiber.

Revision 1.49: download - view: text, markup, annotated - select for diffs
Sun Jun 28 14:31:54 2026 UTC (4 months, 2 weeks ago) by taca
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +2 -2 lines
devel/ruby-async: update to 2.41.0

2.40.0 (2026-06-24)

* Introduce Async::Condition#waiting_count.  This allows you to see how many
  tasks are currently waiting on the condition, which can be useful for
  debugging and monitoring purposes.

2.41.0 (2026-06-28)

* Fixed: Protect initial task from Interrupt exceptions.

Revision 1.48: download - view: text, markup, annotated - select for diffs
Sun Apr 12 14:40:00 2026 UTC (7 months ago) by taca
Branches: MAIN
CVS tags: pkgsrc-2026Q2-base, pkgsrc-2026Q2
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +2 -2 lines
devel/ruby-async: update to 2.39.0

2.38.0 (2026-03-08)

* Rename Task#stop to Task#cancel for better clarity and consistency with
  common concurrency terminology.  The old stop method is still available as
  an alias for backward compatibility, but it is recommended to use cancel
  going forward.

* Forward arguments from Task#wait -> Promise#wait, so task.wait(timeout: N)
  is supported.

2.38.1 (2026-03-17)

* Fix Barrier#async when parent.async yields before the child block
  executes.  Previously, Barrier#wait could return early and miss tracking
  the task entirely, because the task had not yet appended itself to the
  barrier's task list.

2.39.0 (2026-04-05)

* Async::Barrier#wait now returns the number of tasks that were waited for,
  or nil if there were no tasks to wait for.  This provides better feedback
  about the operation, and allows you to know how many tasks were involved
  in the wait.

Revision 1.47: download - view: text, markup, annotated - select for diffs
Mon Mar 9 07:11:14 2026 UTC (8 months, 1 week ago) by taca
Branches: MAIN
CVS tags: pkgsrc-2026Q1-base, pkgsrc-2026Q1
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +2 -2 lines
devel/ruby-async: downgrade to 2.37.0

Version 2.38.0 silently increase minimum version of Ruby to 3.3.
At this time, downgrading to 2.37.0 which supports Ruby 3.2.

Revision 1.46: download - view: text, markup, annotated - select for diffs
Sun Mar 8 13:56:59 2026 UTC (8 months, 1 week ago) by taca
Branches: MAIN
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +2 -2 lines
devel/ruby-async: update to 2.38.0

2.37.0 (2026-03-08)

* Introduce Async::Loop for robust, time-aligned loops.

* Add support for Async::Promise#wait(timeout: N).

2.38.0 (2026-03-08)

* Rename Task#stop to Task#cancel for better clarity and consistency with
  common concurrency terminology.  The old stop method is still available as
  an alias for backward compatibility, but it is recommended to use cancel
  going forward.

* Forward arguments from Task#wait -> Promise#wait, so task.wait(timeout: N)
  is supported.

Revision 1.45: download - view: text, markup, annotated - select for diffs
Sun Jan 25 14:01:22 2026 UTC (9 months, 2 weeks ago) by taca
Branches: MAIN
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +2 -2 lines
devel/ruby-async: update to 2.36.0

2.36.0 (2026-01-22)

* Better class Task documentation.
* Introduce Task.wait_all. (#441)
* Introduce Task#join alias.

Revision 1.44: download - view: text, markup, annotated - select for diffs
Sat Jan 17 15:41:05 2026 UTC (9 months, 4 weeks ago) by taca
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +2 -2 lines
devel/ruby-async: update to 2.35.3

2.35.3 (2026-01-15)

* Add Clock#as_json and Clock#to_json.

Revision 1.43: download - view: text, markup, annotated - select for diffs
Tue Jan 13 15:28:14 2026 UTC (10 months ago) by taca
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +2 -2 lines
devel/ruby-async: update to 2.35.2

2.35.0 (2025-11-30)

* Process.fork is now properly handled by the Async fiber scheduler,
  ensuring that the scheduler state is correctly reset in the child process
  after a fork.  This prevents issues where the child process inherits the
  scheduler state from the parent, which could lead to unexpected behavior.

2.35.1 (2026-01-02)

* Fix incorrect handling of spurious wakeups in Async::Promise#wait, which
  could lead to premature (incorrect) resolution of the promise.

2.35.2 (2026-01-11)

* Improved handling of Process.fork on Ruby 4+.
* Improve @promise state handling in Task#initialize, preventing incomplete
  instances being visible to the scheduler.

Revision 1.42: download - view: text, markup, annotated - select for diffs
Mon Oct 27 14:53:24 2025 UTC (12 months, 2 weeks ago) by taca
Branches: MAIN
CVS tags: pkgsrc-2025Q4-base, pkgsrc-2025Q4
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +3 -3 lines
devel/ruby-async: update to 2.34.0

2.33.0 (2025-09-29)

* Introduce Async::Promise.fulfill for optional promise resolution.

2.34.0 (2025-10-08)

Kernel::Barrier Convenience Interface

Starting multiple concurrent tasks and waiting for them to finish is a
common pattern.  This change introduces a small ergonomic helper, Barrier,
defined in Kernel, that encapsulates this behavior: it creates an
Async::Barrier, yields it to a block, waits for completion (using Sync to
run a reactor if needed), and ensures remaining tasks are stopped on exit.

  require 'async'

  Barrier do |barrier|
	  3.times do |i|
		  barrier.async do |task|
			  sleep(rand * 0.1)  # Simulate work
			  puts "Task #{i} completed"
		  end
	  end
  end

  # All tasks are guaranteed to complete or be stopped when the block exits.

If an exception is raised by a task, it will be propagated to the caller,
and any remaining tasks will be stopped.  The parent: parameter can be used
to specify a parent task for the barrier, otherwise it will use the current
task if available, or create a new reactor if not.

Revision 1.41: download - view: text, markup, annotated - select for diffs
Mon Sep 15 15:11:35 2025 UTC (14 months ago) by taca
Branches: MAIN
CVS tags: pkgsrc-2025Q3-base, pkgsrc-2025Q3
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +3 -3 lines
devel/ruby-async: update to 2.32.0

2.29.0 (2025-09-04)

This release introduces thread-safety as a core concept of Async.  Many core
classes now have thread-safe guarantees, allowing them to be used safely
across multiple threads.

* Thread-safe Async::Condition and Async::Notification, implemented using
  Thread::Queue.
* Thread-safe Async::Queue and Async::LimitedQueue, implemented using
  Thread::Queue and Thread::LimitedQueue respectively.
* Async::Variable is deprecated in favor of Async::Promise.

Introduce Async::Promise

This release introduces the new Async::Promise class and refactors
Async::Task to use promises for state management internally.  This
architectural improvement achieves the design goal that "a task should be a
promise with attached computation and cancellation handling."

* Thread-safe promise implementation with immutable state transitions.
* Consistent state management using symbols: :completed, :failed,
  :cancelled.
* Promise cancellation with cancel() method and Cancel exception class.
* Comprehensive test coverage with 47 new test cases covering all edge
  cases.

	require 'async/promise'

	# Basic promise usage - works independently of Async framework
	promise = Async::Promise.new

	# In another thread or fiber, resolve the promise
	Thread.new do
	  sleep(1)  # Simulate some work
	  promise.resolve("Hello, World!")
	end

	# Wait for the result
	result = promise.wait
	puts result  # => "Hello, World!"

	# Check promise state
	puts promise.resolved?   # => true
	puts promise.completed?  # => true

Promises bridge Thread and Fiber concurrency models - a promise resolved in
one thread can be awaited in a fiber, and vice versa.

Introduce Async::PriorityQueue

The new Async::PriorityQueue provides a thread-safe, fiber-aware queue where
consumers can specify priority levels.  Higher priority consumers are served
first when items become available, with FIFO ordering maintained for equal
priorities.  This is useful for implementing priority-based task processing
systems where critical operations need to be handled before lower priority
work.

	require 'async'
	require 'async/priority_queue'

	Async do
	  queue = Async::PriorityQueue.new

	  # Start consumers with different priorities
	  low_priority = async do
	    puts "Low priority consumer got: #{queue.dequeue(priority: 1)}"
	  end

	  medium_priority = async do
	    puts "Medium priority consumer got: #{queue.dequeue(priority: 5)}"
	  end

	  high_priority = async do
	    puts "High priority consumer got: #{queue.dequeue(priority: 10)}"
	  end

	  # Add items to the queue
	  queue.push("first item")
	  queue.push("second item")
	  queue.push("third item")

	  # Output:
	  # High priority consumer got: first item
	  # Medium priority consumer got: second item
	  # Low priority consumer got: third item
	end

2.29.1 (2025-09-05)

* Better handling of waiter invalidation in PriorityQueue. (#419)

2.30.0 (2025-09-08)

* Add timeout support to Async::Queue#dequeue and Async::Queue#pop methods.
* Add timeout support to Async::PriorityQueue#dequeue and
  Async::PriorityQueue#pop methods.
* Add closed? method to Async::PriorityQueue for full queue interface
  compatibility.
* Support non-blocking operations using timeout: 0 parameter.

2.31.0 (2025-09-08)

* Introduce Async::Deadline for precise timeout management in compound
  operations.

2.32.0 (2025-09-11)

* Introduce Queue#waiting_count and PriorityQueue#waiting_count.  Generally
  for statistics/testing purposes only.

Revision 1.40: download - view: text, markup, annotated - select for diffs
Mon Sep 1 13:22:31 2025 UTC (14 months, 2 weeks ago) by taca
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +2 -2 lines
devel/ruby-async: update to 2.28.1

2.28.1 (2025-09-01)

* Fix race condition between Async::Barrier#stop and finish signalling.

Revision 1.39: download - view: text, markup, annotated - select for diffs
Sat Aug 30 07:31:00 2025 UTC (14 months, 2 weeks ago) by taca
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +2 -2 lines
devel/ruby-async: update to 2.28.0

2.28.0 (2025-08-25)

* Use Traces.current_context and Traces.with_context for better integration
  with OpenTelemetry.

Revision 1.38: download - view: text, markup, annotated - select for diffs
Sun Aug 24 13:55:00 2025 UTC (14 months, 3 weeks ago) by taca
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +2 -2 lines
devel/ruby-async: update to 2.27.4

2.27.4 (2025-08-20)

* Suppress excessive warning in Async::Scheduler#async.

Revision 1.37: download - view: text, markup, annotated - select for diffs
Sat Aug 16 02:27:06 2025 UTC (15 months ago) by taca
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +2 -2 lines
devel/ruby-async: update to 2.27.3

2.27.3 (2025-08-15)

* Ensure trace attributes are strings, fixes integration with OpenTelemetry.

Revision 1.36: download - view: text, markup, annotated - select for diffs
Mon Aug 11 14:35:09 2025 UTC (15 months ago) by taca
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +2 -2 lines
devel/ruby-async: update to 2.27.2

2.27.1 (2025-08-05)

* Updated documentation and agent context.

2.27.2 (2025-08-05)

* Fix context/index.yaml schema.

Revision 1.35: download - view: text, markup, annotated - select for diffs
Sun Jul 27 15:50:34 2025 UTC (15 months, 2 weeks ago) by taca
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +3 -3 lines
devel/ruby-async: update to 2.27.0

2.25.0

* Added support for io_select hook in the fiber scheduler, allowing
  non-blocking IO.select operations.  This enables better integration with
  code that uses IO.select for multiplexing IO operations.

  - Use IO::Event::WorkerPool for Blocking Operations
  - Better handling of IO#close using fiber_interrupt

2.26.0

* Async::Notification#signal now returns true if a task was signaled, false
  otherwise, providing better feedback for notification operations.

* require "async/limited_queue" is required to use Async::LimitedQueue
  without a deprecation warning.  Async::LimitedQueue is not deprecated, but
  it's usage via async/queue is deprecated.

* Async::Task#sleep is deprecated with no replacement.

* Async::Task.yield is deprecated with no replacement.

* Async::Scheduler#async is deprecated, use Async{}, Sync{} or
  Async::Task#async instead.

* Agent context is now available, via the agent-context gem.

* Async::Barrier Improvements

  Async::Barrier now provides more flexible and predictable behavior for
  waiting on task completion:

  - Completion-order waiting: barrier.wait now processes tasks in the order
    they complete rather than the order they were created.  This provides
    more predictable behavior when tasks have different execution times.

   - Block-based waiting: barrier.wait now accepts an optional block that
     yields each task as it completes, allowing for custom handling of
     individual tasks.

   - Partial completion support: The new block-based interface allows you to
     wait for only the first N tasks to complete.

* Introduce Async::Queue#close

  Async::Queue and Async::LimitedQueue can now be closed, which provides
  better resource management and error handling:

  - New close method: Both queue types now have a close method that prevents
    further items from being added and signals any waiting tasks.

  - Consistent error handling: All queue modification methods (push,
    enqueue, <<) now raise Async::Queue::ClosedError when called on a closed
    queue.

  - Waiting task signaling: When a queue is closed, any tasks waiting on
    dequeue (for regular queues) or enqueue (for limited queues) are
    properly signaled and can complete.

2.27.0

* Async::Task#stop supports an optional cause: argument (that defaults to
  $!), which allows you to specify the cause (exception) for stopping the
  task.

* Add thread-safety agent context.

Revision 1.34: download - view: text, markup, annotated - select for diffs
Tue May 27 16:13:44 2025 UTC (17 months, 2 weeks ago) by taca
Branches: MAIN
CVS tags: pkgsrc-2025Q2-base, pkgsrc-2025Q2
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +1 -3 lines
Remove RUBY_VERSIONS_INCOMPATIBLE line which contains 31 only.

Revision 1.33: download - view: text, markup, annotated - select for diffs
Sat May 17 06:06:02 2025 UTC (18 months ago) by taca
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +4 -2 lines
devel/ruby-async: update to 2.24.0

2.24.0 (2025-05-03)

* Ruby v3.1 support is dropped.
* Async::Wrapper which was previously deprecated, is now removed.

Flexible Timeouts

When {ruby Async::Scheduler#with_timeout} is invoked with a block, it can
receive a {ruby Async::Timeout} instance.  This allows you to adjust or
cancel the timeout while the block is executing.  This is useful for
long-running tasks that may need to adjust their timeout based on external
factors.

Async do
	Async::Scheduler.with_timeout(5) do |timeout|
		# Do some work that may take a while...

		if some_condition
			timeout.cancel! # Cancel the timeout
		else
			# Add 10 seconds to the current timeout:
			timeout.adjust(10)

			# Reduce the timeout by 10 seconds:
			timeout.adjust(-10)

			# Set the timeout to 10 seconds from now:
			timeout.duration = 10

			# Increase the current duration:
			timeout.duration += 10
		end
	end
end

Revision 1.32: download - view: text, markup, annotated - select for diffs
Sun Mar 16 13:55:11 2025 UTC (20 months ago) by taca
Branches: MAIN
CVS tags: pkgsrc-2025Q1-base, pkgsrc-2025Q1
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +3 -3 lines
devel/ruby-async: update to 2.23.1

2.23.1 (2025-03-10)

* Fixed a tiny typo in the debugging docs (#377)
* Remove GitS from readme.

Revision 1.31: download - view: text, markup, annotated - select for diffs
Sun Feb 23 14:00:54 2025 UTC (20 months, 3 weeks ago) by taca
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +2 -2 lines
devel/ruby-async: update to 2.23.0

2.23.0 (2025-02-13)

* Rename ASYNC_SCHEDULER_DEFAULT_WORKER_POOL to ASYNC_SCHEDULER_WORKER_POOL.

Fiber Stall Profiler

After several iterations of experimentation, we are officially introducing
the fiber stall profiler, implemented using the optional fiber-profiler gem.
This gem is not included by default, but can be added to your project:

    $ bundle add fiber-profiler

After adding the gem, you can enable the fiber stall profiler by setting the
FIBER_PROFILER_CAPTURE=true environment variable:

    $ FIBER_PROFILER_CAPTURE=true bundle exec ruby -rasync -e 'Async{Fiber.blocking{sleep 0.1}}'
    Fiber stalled for 0.105 seconds
    -e:1 in c-call '#<Class:Fiber>#blocking' (0.105s)
	    -e:1 in c-call 'Kernel#sleep' (0.105s)
    Skipped 1 calls that were too short to be meaningful.

The fiber profiler will help you find problems with your code that cause the
event loop to stall, which can be a common source of performance issues in
asynchronous code.

Revision 1.30: download - view: text, markup, annotated - select for diffs
Sun Feb 9 14:22:04 2025 UTC (21 months ago) by taca
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +5 -3 lines
devel/ruby-async: update to 2.22.0

2.22.0 (2025-02-07)

* Prefer bare sleep.
* Updated scheduler guide.
* Add Async::Clock#reset!.
* Add async.task.finished metric.

Revision 1.29: download - view: text, markup, annotated - select for diffs
Sun Dec 8 16:23:05 2024 UTC (23 months, 1 week ago) by taca
Branches: MAIN
CVS tags: pkgsrc-2024Q4-base, pkgsrc-2024Q4
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +3 -3 lines
devel/ruby-async: update to 2.21.1

2.19.0 (2024-11-08)

Async::Scheduler Debugging

Occasionally on issues, I encounter people asking for help and I need more
information.  Pressing Ctrl-C to exit a hung program is common, but it
usually doesn't provide enough information to diagnose the problem.  Setting
the CONSOLE_LEVEL=debug environment variable will now print additional
information about the scheduler when you interrupt it, including a backtrace
of the current tasks.

> CONSOLE_LEVEL=debug bundle exec ruby ./test.rb
^C  0.0s    debug: Async::Reactor [oid=0x974] [ec=0x988] [pid=9116] [2024-11-08 14:12:03 +1300]
               | Scheduler interrupted: Interrupt
               | #<Async::Reactor:0x0000000000000974 1 children (running)>
               | 	#<Async::Task:0x000000000000099c /Users/samuel/Developer/socketry/async/lib/async/scheduler.rb:185:in `transfer' (running)>
               | 	→ /Users/samuel/Developer/socketry/async/lib/async/scheduler.rb:185:in `transfer'
               | 	  /Users/samuel/Developer/socketry/async/lib/async/scheduler.rb:185:in `block'
               | 	  /Users/samuel/Developer/socketry/async/lib/async/scheduler.rb:207:in `kernel_sleep'
               | 	  /Users/samuel/Developer/socketry/async/test.rb:7:in `sleep'
               | 	  /Users/samuel/Developer/socketry/async/test.rb:7:in `sleepy'
               | 	  /Users/samuel/Developer/socketry/async/test.rb:12:in `block in <top (required)>'
               | 	  /Users/samuel/Developer/socketry/async/lib/async/task.rb:197:in `block in run'
               | 	  /Users/samuel/Developer/socketry/async/lib/async/task.rb:420:in `block in schedule'
/Users/samuel/Developer/socketry/async/lib/async/scheduler.rb:317:in `select': Interrupt
... (backtrace continues) ...

This gives better visibility into what the scheduler is doing, and should
help diagnose issues.

Console Shims

The async gem depends on console gem, because my goal was to have good
logging by default without thinking about it too much.  However, some users
prefer to avoid using the console gem for logging, so I've added an
experimental set of shims which should allow you to bypass the console gem
entirely.

require 'async/console'
require 'async'

Async{raise "Boom"}

Will now use Kernel#warn to print the task failure warning:

#<Async::Task:0x00000000000012d4 /home/samuel/Developer/socketry/async/lib/async/task.rb:104:in `backtrace' (running)>
Task may have ended with unhandled exception.
(irb):4:in `block in <top (required)>': Boom (RuntimeError)
	from /home/samuel/Developer/socketry/async/lib/async/task.rb:197:in `block in run'
	from /home/samuel/Developer/socketry/async/lib/async/task.rb:420:in `block in schedule'

2.20.0 (2024-11-10)

Traces and Metrics Providers

Async now has traces and metrics providers for various core classes.  This
allows you to emit traces and metrics to a suitable backend (including
DataDog, New Relic, OpenTelemetry, etc.) for monitoring and debugging
purposes.

To take advantage of this feature, you will need to introduce your own
config/traces.rb and config/metrics.rb.  Async's own repository includes
these files for testing purposes, you could copy them into your own project
and modify them as needed.

2.21.0 (2024-11-21)

(No release note, not released?)

2.21.1 (2024-11-27)

Worker Pool

Ruby 3.4 will feature a new fiber scheduler hook, blocking_operation_wait
which allows the scheduler to redirect the work given to rb_nogvl to a
worker pool.

The Async scheduler optionally supports this feature using a worker pool, by using the following environment variable:

ASYNC_SCHEDULER_DEFAULT_WORKER_POOL=true

This will cause the scheduler to use a worker pool for general blocking
operations, rather than blocking the event loop.

It should be noted that this isn't a net win, as the overhead of using a
worker pool can be significant compared to the rb_nogvl work.  As such, it
is recommended to benchmark your application with and without the worker
pool to determine if it is beneficial.

Revision 1.28: download - view: text, markup, annotated - select for diffs
Wed Nov 6 14:03:37 2024 UTC (2 years ago) by taca
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +2 -2 lines
devel/ruby-async: update to 2.18.0

2.18.0 (2024-10-29)

* Add support for Sync(annotation:), so that you can annotate the block with
  a description of what it does, even if it doesn't create a new task.

Revision 1.27: download - view: text, markup, annotated - select for diffs
Wed Sep 18 14:59:00 2024 UTC (2 years, 1 month ago) by taca
Branches: MAIN
CVS tags: pkgsrc-2024Q3-base, pkgsrc-2024Q3
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +3 -3 lines
devel/ruby-async: update to 2.17.0

2.15.0 (2024-08-04)

* Allow transient tasks to exit completely. (#336)

2.15.1 (2024-08-07)

* Allow transient tasks to exit gracefully. (#337)

2.15.2 (2024-08-07)

* Transient tasks should only be stopped once. (#338)

2.15.3 (2024-08-08)

* Ensure that defer_stop resets state. (#339)

2.16.0 (2024-08-23)

Better Handling of Async and Sync in Nested Fibers

Interleaving bare fibers within Async and Sync blocks should not cause
problems, but it presents a number of issues in the current implementation.
Tracking the parent-child relationship between tasks, when they are
interleaved with bare fibers, is difficult.  The current implementation
assumes that if there is no parent task, then it should create a new
reactor.  This is not always the case, as the parent task might not be
visible due to nested Fibers.  As a result, Async will create a new reactor,
trying to stop the existing one, causing major internal consistency issues.

I encountered this issue when trying to use Async within a streaming
response in Rails.  The protocol-rack uses a normal fiber to wrap streaming
responses, and if you try to use Async within it, it will create a new
reactor, causing the server to lock up.

Ideally, Async and Sync helpers should work when any Fiber.scheduler is
defined.  Right now, it's unrealistic to expect Async::Task to work in any
scheduler, but at the very least, the following should work:

    reactor = Async::Reactor.new # internally calls Fiber.set_scheduler

    # This should run in the above reactor, rather than creating a new one.
    Async do
      puts "Hello World"
    end

In order to do this, bare Async and Sync blocks should use Fiber.scheduler
as a parent if possible.

See #340 for more details.

2.16.1 (2024-08-26)

* Add timeout to timeout error message.

2.17.0 (2024-09-05)

* Introduce Async::Queue#push and Async::Queue#pop for compatibility with
  ::Queue.

Revision 1.26: download - view: text, markup, annotated - select for diffs
Sat Jul 20 15:20:07 2024 UTC (2 years, 3 months ago) by taca
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +2 -2 lines
xdevel/ruby-async: update to 2.14.2

2.14.1 (2024-07-15)

* Minor updates to compatibility guide.
* Add initial debugging guide.
* Restore error logging. (#331)
* Remove unused gem dependency.
* Use direct instance variable for async_task.

2.14.2 (2024-07-17)

* Fix failure logs and add explicit tests.

Revision 1.25: download - view: text, markup, annotated - select for diffs
Mon Jul 15 15:29:32 2024 UTC (2 years, 4 months ago) by taca
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +2 -2 lines
devel/ruby-async: update to 2.14.1

2.14.1 (2024-07-15)

* Minor updates to compatibility guide.
* Add initial debugging guide.
* Restore error logging. (#331)
* Use direct instance variable for async_task.

Revision 1.24: download - view: text, markup, annotated - select for diffs
Sun Jul 14 15:45:52 2024 UTC (2 years, 4 months ago) by taca
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +2 -2 lines
devel/ruby-async: update to 2.14.0

2.14.0 (2024-07-14)

* Opt-in to task failures using $DEBUG only.
* Update external tests - drop async-io.

Revision 1.23: download - view: text, markup, annotated - select for diffs
Sun Jul 14 07:21:45 2024 UTC (2 years, 4 months ago) by taca
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +2 -2 lines
devel/ruby-async: update to 2.13.0

2.13.0 (2024-07-12)

* Update logo.
* Waiter#async: pass options to parent (#327)
* Minor documentation updates.
* Allow queue to be used for task finished. (#276)

Revision 1.22: download - view: text, markup, annotated - select for diffs
Sun Jun 30 16:06:01 2024 UTC (2 years, 4 months ago) by taca
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +3 -3 lines
devel/ruby-async: update to 2.12.1

2.12.1 (2024-06-23)

* Docs: correct ruby version requirement
* Docs: various typo fixes
* Fix idle load computation. (#323)
* Propagate interrupts when exiting event loop. (#322)

Revision 1.21: download - view: text, markup, annotated - select for diffs
Sat Jun 8 15:40:38 2024 UTC (2 years, 5 months ago) by taca
Branches: MAIN
CVS tags: pkgsrc-2024Q2-base, pkgsrc-2024Q2
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +2 -3 lines
devel/ruby-async: update to 2.12.0

2.12.0 (2024-06-04)

* Add dining philosopher's example.
* Prefer IO::Event::Timers. (#316)
* Add benchmark timers dependencies.

Revision 1.20: download - view: text, markup, annotated - select for diffs
Sun May 5 16:41:27 2024 UTC (2 years, 6 months ago) by taca
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +3 -3 lines
devel/ruby-async: update to 2.11.0

2.10.2 (2024-04-15)

What's Changed

* Update readme.md - fixing a typo by @peychinov in #313
* Add source_code_uri to published gemspec.

New Contributors

* @peychinov made their first contribution in #313

Contributors

* @peychinov


2.11.0 (2024-05-04)

What's Changed

* Update dependency on console gem and modernize usage.  by @ioquatix in
  #315

Contributors

* @ioquatix

Revision 1.19: download - view: text, markup, annotated - select for diffs
Sun Apr 7 14:39:33 2024 UTC (2 years, 7 months ago) by taca
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +3 -3 lines
devel/ruby-async: update to 2.10.1

2.10.0 (2024-03-27)

* Introduce Async::Task#defer_stop by @ioquatix in #310

2.10.1 (2024-03-27)

* Raise stop directly in #defer_stop. by @ioquatix in #311

Revision 1.18: download - view: text, markup, annotated - select for diffs
Tue Mar 5 13:21:29 2024 UTC (2 years, 8 months ago) by taca
Branches: MAIN
CVS tags: pkgsrc-2024Q1-base, pkgsrc-2024Q1
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +3 -3 lines
devel/ruby-async: update to 2.9.0

2.9.0 (2024-03-05)

What's Changed

* Introduce Scheduler#load and Async::Idler for load shedding and
  saturation. (#309)

Revision 1.17: download - view: text, markup, annotated - select for diffs
Sat Feb 24 14:10:46 2024 UTC (2 years, 8 months ago) by taca
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +2 -2 lines
devel/ruby-async: update to 2.8.2

2.8.2 (2024-02-24)

What's Changed

* Fix compatibility with quoting change. by @ioquatix in #307
* Better handling of interrupts during stop/terminate. by @ioquatix in #308

Revision 1.16: download - view: text, markup, annotated - select for diffs
Sat Feb 3 15:07:58 2024 UTC (2 years, 9 months ago) by taca
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +2 -2 lines
devel/ruby-async: update to 2.8.1

2.7.0 (2024-01-02)

What's Changed

* Try testing on Ruby 3.3. by @ioquatix in #294
* Add support for IO#timeout in io_read, io_write and io_wait. by @ioquatix
  in #296

2.8.0 (2024-01-03)

What's Changed

* Allow Interrupt to retry the run loop after issuing #stop. by @ioquatix in
  #297
* Add write timeout test. by @ioquatix in #298

2.8.1 (2024-02-01)

What's Changed

* Don't enable io_write hook on Ruby < 3.3.1 as it's buggy. by @ioquatix in
  #303

Revision 1.15: download - view: text, markup, annotated - select for diffs
Wed Jan 3 15:55:57 2024 UTC (2 years, 10 months ago) by taca
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +1 -3 lines
devel/ruby-async: remove extra RUBY_VERSIONS_ACCEPTED

Revision 1.14: download - view: text, markup, annotated - select for diffs
Sat Nov 11 09:57:32 2023 UTC (3 years ago) by taca
Branches: MAIN
CVS tags: pkgsrc-2023Q4-base, pkgsrc-2023Q4
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +2 -2 lines
devel/ruby-async: update to 2.6.5

2.6.5 (2023-10-29)

* Guide: ensure url exists in block (#278)
* Improved documentation.
* Remove duplicate attr :annotation.

Revision 1.13: download - view: text, markup, annotated - select for diffs
Sat Aug 26 13:20:08 2023 UTC (3 years, 2 months ago) by taca
Branches: MAIN
CVS tags: pkgsrc-2023Q3-base, pkgsrc-2023Q3
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +2 -2 lines
devel/ruby-async: update to 2.6.4

2.6.4 (2023-08-25)

* If a task returns an exception value, do not raise it in #wait. (#270)
* Minor improvement to test performance.
* Test multiple process waits. (#273)
* Failing timeout while getting from stdin. (#266)
* Fix handling of TimeoutError in io_wait. (#274)
* Add test for blocking IO#gets in task. (#267)

Revision 1.12: download - view: text, markup, annotated - select for diffs
Sun Jul 30 03:51:32 2023 UTC (3 years, 3 months ago) by taca
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +2 -2 lines
devel/ruby-async: update to 2.6.3

2.6.3 (2023-07-28)

*  Documentation improvements. (#248)
* Modernize gem. (#249)
* Extended documentation. (#250)
  - Consistent usage of reactor/event loop terminology.
  - Show how to use `ensure` with barrier.
  - Expanded documentation / questions / answers.
  - Add best practices.
* Improve readme.
* Add code of conduct.
* Replace 3.times do with 1.upto(3) do.
* Fix guide lines, fixes #251.
* Fix Markdown syntax highlighting marker (#252)
* Guide: ensure barrier is in scope (#253)
  - This change avoids a NoMethodError on the barrier local variable.  And
    also a LoadError, with the Async::Barrier constant.
* Follow-up barrier in scope docs fix (#254)
  - This makes the same change as #253 but in this file.
* Don't run scheduler when there is a pending exception. (#262)
* Ensure the scheduler is cleaned up on exit.
* Better handling of interrupted flag. (#264)

Revision 1.11: download - view: text, markup, annotated - select for diffs
Sat Jun 17 13:27:33 2023 UTC (3 years, 5 months ago) by taca
Branches: MAIN
CVS tags: pkgsrc-2023Q2-base, pkgsrc-2023Q2
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +2 -2 lines
devel/ruby-async: update to 2.6.2

2.6.2 (2023-06-13)

What's Changed

* Don't allow event loop to be interrupted at any time. by @ioquatix in #223

Revision 1.10: download - view: text, markup, annotated - select for diffs
Fri Jun 9 13:43:54 2023 UTC (3 years, 5 months ago) by taca
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +3 -2 lines
devel/ruby-async: update to 2.6.1

2.6.0 (2023-06-07)

What's Changed

* Fix trasient typo; make general syntax and punctuation edits to readme by
  @ColinDKelley in #235
* Better error handling when scheduler is closed. by @ioquatix in #240
* Delegate to Fiber#annotate where possible. by @ioquatix in #241
* Fix handling of stop stopping the stopping task. by @ioquatix in #242
* Strip device suffix before resolving hostname. by @ioquatix in #243

New Contributors

* @ColinDKelley made their first contribution in #235

2.6.1 (2023-06-09)

What's Changed

* Ensure transient tasks are correctly terminated. by @ioquatix in #245

Revision 1.9: download - view: text, markup, annotated - select for diffs
Thu May 18 14:07:14 2023 UTC (3 years, 6 months ago) by taca
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +2 -2 lines
devel/ruby-async: update to 2.5.1

2.5.1 (2023-05-15)

* LimitedBarrier was renamed to Waiter (#231)

Revision 1.8: download - view: text, markup, annotated - select for diffs
Sat Apr 8 13:24:44 2023 UTC (3 years, 7 months ago) by taca
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +2 -2 lines
devel/ruby-async: update to 2.5.0

2.5.0 Latest (2023-03-19)

What's Changed

* Improved state handling by @ioquatix in #222

Revision 1.7: download - view: text, markup, annotated - select for diffs
Wed Mar 15 14:19:32 2023 UTC (3 years, 8 months ago) by taca
Branches: MAIN
CVS tags: pkgsrc-2023Q1-base, pkgsrc-2023Q1
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +2 -2 lines
devel/ruby-async: update to 2.4.2

2.4.1 (2023-03-07)

* Allow running the test in isolation.

* Avoid race conditions in Scheduler#interrupt and Scheduler#unblock. (#216)

2.4.2 (2023-03-11)

* Ensure all tasks are completed before closing scheduler. (#219)

Revision 1.6: download - view: text, markup, annotated - select for diffs
Sun Mar 5 13:35:42 2023 UTC (3 years, 8 months ago) by taca
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +2 -2 lines
devel/ruby-async: update to 2.4.0

2.4.0 (2023-03-02)

What's Changed

* Allow assigning to semaphore limit. by @ioquatix in #215

Revision 1.5: download - view: text, markup, annotated - select for diffs
Sat Jan 21 13:57:30 2023 UTC (3 years, 9 months ago) by taca
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +2 -2 lines
Add ruby32 support.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Tue Jan 3 09:44:15 2023 UTC (3 years, 10 months ago) by taca
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +2 -2 lines
devel/ruby-async: update to 2.3.1

2.3.1 (2022-12-27)

No release note.  Please refer commit log
<https://github.com/socketry/async/compare/v2.3.0...v2.3.1> in detail.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Sun Dec 4 16:57:29 2022 UTC (3 years, 11 months ago) by taca
Branches: MAIN
CVS tags: pkgsrc-2022Q4-base, pkgsrc-2022Q4
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +3 -3 lines
devel/ruby-async: update to 2.3.0

2.3.0 (2022-12-03)

What's Changed

* Convert tests to sus. by @ioquatix in #188
* Use a linked list for the barrier implementation. by @ioquatix in #192
* Add a concurrency primitive for waiting for a specific number of tasks to
  complete. by @ioquatix in #189
* Better support for Fiber.set_scheduler. by @ioquatix in #194
* Rename Async::LimitedBarrier to Async::Waiter based on feedback. by
  @ioquatix in #196
* Relax io-event dependency. by @ioquatix in #200
* Implement semaphore using linked list. by @ioquatix in #203

Revision 1.2: download - view: text, markup, annotated - select for diffs
Mon Nov 14 11:49:42 2022 UTC (4 years ago) by taca
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +3 -1 lines
devel/ruby-async: restrict to Ruby 3.1

Noted by wiz@ via private e-mail and thanks much.

Revision 1.1: download - view: text, markup, annotated - select for diffs
Fri Nov 11 13:41:34 2022 UTC (4 years ago) by taca
Branches: MAIN
devel/ruby-async: add package version 2.2.1

Required by ruby-html-proofer package.


Async

Async is a composable asynchronous I/O framework for Ruby based on io-event
and timers.

    "Lately I've been looking into async, as one of my projects -
    tus-ruby-server - would really benefit from non-blocking I/O.
    It's really beautifully designed." - janko

Features

* Scalable event-driven I/O for Ruby. Thousands of clients per process!
* Light weight fiber-based concurrency. No need for callbacks!
* Multi-thread/process containers for parallelism.
* Growing eco-system of event-driven components.

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options

CVSweb <webmaster@jp.NetBSD.org>