Skip to content

Commit 335de7f

Browse files
author
taca
committed
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.
1 parent 4d3aefc commit 335de7f

3 files changed

Lines changed: 9 additions & 8 deletions

File tree

devel/ruby-async/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# $NetBSD: Makefile,v 1.41 2025/09/15 15:11:35 taca Exp $
1+
# $NetBSD: Makefile,v 1.42 2025/10/27 14:53:24 taca Exp $
22

3-
DISTNAME= async-2.32.0
3+
DISTNAME= async-2.34.0
44
CATEGORIES= devel
55

66
MAINTAINER= pkgsrc-users@NetBSD.org
@@ -11,7 +11,7 @@ LICENSE= mit
1111
USE_LANGUAGES= # none
1212

1313
DEPENDS+= ${RUBY_PKGPREFIX}-console>=1.29<2:../../devel/ruby-console
14-
DEPENDS+= ${RUBY_PKGPREFIX}-io-event>=1.12<2:../../devel/ruby-io-event
14+
DEPENDS+= ${RUBY_PKGPREFIX}-io-event>=1.11<2:../../devel/ruby-io-event
1515
DEPENDS+= ${RUBY_PKGPREFIX}-fiber-annotation>=0:../../devel/ruby-fiber-annotation
1616
DEPENDS+= ${RUBY_PKGPREFIX}-traces>=0.18<1:../../devel/ruby-traces
1717
DEPENDS+= ${RUBY_PKGPREFIX}-metrics>=0.12<1:../../devel/ruby-metrics

devel/ruby-async/PLIST

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@comment $NetBSD: PLIST,v 1.12 2025/09/15 15:11:35 taca Exp $
1+
@comment $NetBSD: PLIST,v 1.13 2025/10/27 14:53:24 taca Exp $
22
${GEM_HOME}/cache/${GEM_NAME}.gem
33
${GEM_LIBDIR}/context/best-practices.md
44
${GEM_LIBDIR}/context/debugging.md
@@ -35,6 +35,7 @@ ${GEM_LIBDIR}/lib/async/variable.rb
3535
${GEM_LIBDIR}/lib/async/version.rb
3636
${GEM_LIBDIR}/lib/async/waiter.rb
3737
${GEM_LIBDIR}/lib/kernel/async.rb
38+
${GEM_LIBDIR}/lib/kernel/barrier.rb
3839
${GEM_LIBDIR}/lib/kernel/sync.rb
3940
${GEM_LIBDIR}/lib/metrics/provider/async.rb
4041
${GEM_LIBDIR}/lib/metrics/provider/async/task.rb

devel/ruby-async/distinfo

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
$NetBSD: distinfo,v 1.37 2025/09/15 15:11:35 taca Exp $
1+
$NetBSD: distinfo,v 1.38 2025/10/27 14:53:24 taca Exp $
22

3-
BLAKE2s (async-2.32.0.gem) = fda2de19f73199f296aee145093cc5285993999ddb467f1507833b6015523d24
4-
SHA512 (async-2.32.0.gem) = a21541f9c5fab97a39e69c0098077db6f342183889bfcff3ba39d740f8b5bf852e3ad6fa830f047424ff7bdab4d13984ca4f916c2d718cccf76a1b3bdccf3183
5-
Size (async-2.32.0.gem) = 61440 bytes
3+
BLAKE2s (async-2.34.0.gem) = fbffa102c4ccce2f29225c9ff063468959e2f04e5cf46f746b12f650668385e6
4+
SHA512 (async-2.34.0.gem) = 4ce62199bb8a40815031f74eae8179ab0fda4463fef08c5c78be60eeab21b26329f4b2eee29a4673012695ed5412e8de4f1a0b1c3230b7ed417bee0d79f0e136
5+
Size (async-2.34.0.gem) = 62976 bytes

0 commit comments

Comments
 (0)