pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/devel/ruby-async
Module Name: pkgsrc
Committed By: taca
Date: Mon Sep 15 15:11:35 UTC 2025
Modified Files:
pkgsrc/devel/ruby-async: Makefile PLIST distinfo
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 pkgsrc/devel/ruby-async/Makefile
cvs rdiff -u -r1.11 -r1.12 pkgsrc/devel/ruby-async/PLIST
cvs rdiff -u -r1.36 -r1.37 pkgsrc/devel/ruby-async/distinfo
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/devel/ruby-async/Makefile
diff -u pkgsrc/devel/ruby-async/Makefile:1.40 pkgsrc/devel/ruby-async/Makefile:1.41
--- pkgsrc/devel/ruby-async/Makefile:1.40 Mon Sep 1 13:22:31 2025
+++ pkgsrc/devel/ruby-async/Makefile Mon Sep 15 15:11:35 2025
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.40 2025/09/01 13:22:31 taca Exp $
+# $NetBSD: Makefile,v 1.41 2025/09/15 15:11:35 taca Exp $
-DISTNAME= async-2.28.1
+DISTNAME= async-2.32.0
CATEGORIES= devel
MAINTAINER= pkgsrc-users%NetBSD.org@localhost
@@ -13,7 +13,7 @@ USE_LANGUAGES= # none
DEPENDS+= ${RUBY_PKGPREFIX}-console>=1.29<2:../../devel/ruby-console
DEPENDS+= ${RUBY_PKGPREFIX}-io-event>=1.12<2:../../devel/ruby-io-event
DEPENDS+= ${RUBY_PKGPREFIX}-fiber-annotation>=0:../../devel/ruby-fiber-annotation
-DEPENDS+= ${RUBY_PKGPREFIX}-traces>=0.15<1:../../devel/ruby-traces
+DEPENDS+= ${RUBY_PKGPREFIX}-traces>=0.18<1:../../devel/ruby-traces
DEPENDS+= ${RUBY_PKGPREFIX}-metrics>=0.12<1:../../devel/ruby-metrics
.include "../../lang/ruby/gem.mk"
Index: pkgsrc/devel/ruby-async/PLIST
diff -u pkgsrc/devel/ruby-async/PLIST:1.11 pkgsrc/devel/ruby-async/PLIST:1.12
--- pkgsrc/devel/ruby-async/PLIST:1.11 Mon Aug 11 14:35:09 2025
+++ pkgsrc/devel/ruby-async/PLIST Mon Sep 15 15:11:35 2025
@@ -1,6 +1,5 @@
-@comment $NetBSD: PLIST,v 1.11 2025/08/11 14:35:09 taca Exp $
+@comment $NetBSD: PLIST,v 1.12 2025/09/15 15:11:35 taca Exp $
${GEM_HOME}/cache/${GEM_NAME}.gem
-${GEM_LIBDIR}/agent.md
${GEM_LIBDIR}/context/best-practices.md
${GEM_LIBDIR}/context/debugging.md
${GEM_LIBDIR}/context/getting-started.md
@@ -15,11 +14,14 @@ ${GEM_LIBDIR}/lib/async/clock.rb
${GEM_LIBDIR}/lib/async/condition.md
${GEM_LIBDIR}/lib/async/condition.rb
${GEM_LIBDIR}/lib/async/console.rb
+${GEM_LIBDIR}/lib/async/deadline.rb
${GEM_LIBDIR}/lib/async/idler.rb
${GEM_LIBDIR}/lib/async/limited_queue.rb
${GEM_LIBDIR}/lib/async/list.rb
${GEM_LIBDIR}/lib/async/node.rb
${GEM_LIBDIR}/lib/async/notification.rb
+${GEM_LIBDIR}/lib/async/priority_queue.rb
+${GEM_LIBDIR}/lib/async/promise.rb
${GEM_LIBDIR}/lib/async/queue.rb
${GEM_LIBDIR}/lib/async/reactor.rb
${GEM_LIBDIR}/lib/async/scheduler.rb
Index: pkgsrc/devel/ruby-async/distinfo
diff -u pkgsrc/devel/ruby-async/distinfo:1.36 pkgsrc/devel/ruby-async/distinfo:1.37
--- pkgsrc/devel/ruby-async/distinfo:1.36 Mon Sep 1 13:22:31 2025
+++ pkgsrc/devel/ruby-async/distinfo Mon Sep 15 15:11:35 2025
@@ -1,5 +1,5 @@
-$NetBSD: distinfo,v 1.36 2025/09/01 13:22:31 taca Exp $
+$NetBSD: distinfo,v 1.37 2025/09/15 15:11:35 taca Exp $
-BLAKE2s (async-2.28.1.gem) = 72d10df7e9e244906302910f906ffc9ee1ca861c9ccb076f928fe9ebbabd970d
-SHA512 (async-2.28.1.gem) = 7e6289cb555a2d185b89703dd42ff1ba0ed7405baac6c113a313e8ec29c9c22cb6255c9cfe6c04406bb7c817a3ae682b2dad70314a71dda88c788636e0b76817
-Size (async-2.28.1.gem) = 58368 bytes
+BLAKE2s (async-2.32.0.gem) = fda2de19f73199f296aee145093cc5285993999ddb467f1507833b6015523d24
+SHA512 (async-2.32.0.gem) = a21541f9c5fab97a39e69c0098077db6f342183889bfcff3ba39d740f8b5bf852e3ad6fa830f047424ff7bdab4d13984ca4f916c2d718cccf76a1b3bdccf3183
+Size (async-2.32.0.gem) = 61440 bytes
Home |
Main Index |
Thread Index |
Old Index