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: Sun Dec 8 16:23:05 UTC 2024
Modified Files:
pkgsrc/devel/ruby-async: Makefile PLIST distinfo
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 pkgsrc/devel/ruby-async/Makefile
cvs rdiff -u -r1.6 -r1.7 pkgsrc/devel/ruby-async/PLIST
cvs rdiff -u -r1.25 -r1.26 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.28 pkgsrc/devel/ruby-async/Makefile:1.29
--- pkgsrc/devel/ruby-async/Makefile:1.28 Wed Nov 6 14:03:37 2024
+++ pkgsrc/devel/ruby-async/Makefile Sun Dec 8 16:23:05 2024
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.28 2024/11/06 14:03:37 taca Exp $
+# $NetBSD: Makefile,v 1.29 2024/12/08 16:23:05 taca Exp $
-DISTNAME= async-2.18.0
+DISTNAME= async-2.21.1
CATEGORIES= devel
MAINTAINER= pkgsrc-users%NetBSD.org@localhost
@@ -10,7 +10,7 @@ LICENSE= mit
USE_LANGUAGES= # none
-DEPENDS+= ${RUBY_PKGPREFIX}-console>=1.26<2:../../devel/ruby-console
+DEPENDS+= ${RUBY_PKGPREFIX}-console>=1.29<2:../../devel/ruby-console
DEPENDS+= ${RUBY_PKGPREFIX}-io-event>=1.6.5<2:../../devel/ruby-io-event
DEPENDS+= ${RUBY_PKGPREFIX}-fiber-annotation>=0:../../devel/ruby-fiber-annotation
Index: pkgsrc/devel/ruby-async/PLIST
diff -u pkgsrc/devel/ruby-async/PLIST:1.6 pkgsrc/devel/ruby-async/PLIST:1.7
--- pkgsrc/devel/ruby-async/PLIST:1.6 Wed Sep 18 14:59:00 2024
+++ pkgsrc/devel/ruby-async/PLIST Sun Dec 8 16:23:05 2024
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.6 2024/09/18 14:59:00 taca Exp $
+@comment $NetBSD: PLIST,v 1.7 2024/12/08 16:23:05 taca Exp $
${GEM_HOME}/cache/${GEM_NAME}.gem
${GEM_LIBDIR}/lib/async.rb
${GEM_LIBDIR}/lib/async/barrier.md
@@ -6,6 +6,7 @@ ${GEM_LIBDIR}/lib/async/barrier.rb
${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/idler.rb
${GEM_LIBDIR}/lib/async/list.rb
${GEM_LIBDIR}/lib/async/node.rb
@@ -21,9 +22,15 @@ ${GEM_LIBDIR}/lib/async/variable.rb
${GEM_LIBDIR}/lib/async/version.rb
${GEM_LIBDIR}/lib/async/waiter.md
${GEM_LIBDIR}/lib/async/waiter.rb
+${GEM_LIBDIR}/lib/async/worker_pool.rb
${GEM_LIBDIR}/lib/async/wrapper.rb
${GEM_LIBDIR}/lib/kernel/async.rb
${GEM_LIBDIR}/lib/kernel/sync.rb
+${GEM_LIBDIR}/lib/metrics/provider/async.rb
+${GEM_LIBDIR}/lib/metrics/provider/async/task.rb
+${GEM_LIBDIR}/lib/traces/provider/async.rb
+${GEM_LIBDIR}/lib/traces/provider/async/barrier.rb
+${GEM_LIBDIR}/lib/traces/provider/async/task.rb
${GEM_LIBDIR}/license.md
${GEM_LIBDIR}/readme.md
${GEM_LIBDIR}/releases.md
Index: pkgsrc/devel/ruby-async/distinfo
diff -u pkgsrc/devel/ruby-async/distinfo:1.25 pkgsrc/devel/ruby-async/distinfo:1.26
--- pkgsrc/devel/ruby-async/distinfo:1.25 Wed Nov 6 14:03:37 2024
+++ pkgsrc/devel/ruby-async/distinfo Sun Dec 8 16:23:05 2024
@@ -1,5 +1,5 @@
-$NetBSD: distinfo,v 1.25 2024/11/06 14:03:37 taca Exp $
+$NetBSD: distinfo,v 1.26 2024/12/08 16:23:05 taca Exp $
-BLAKE2s (async-2.18.0.gem) = 3d56dadcbc8ed45b4b349c7bbdd3a95a2b16fa98b95ccb5f5e9e37a299bdff4b
-SHA512 (async-2.18.0.gem) = bfb08439e84a3192218c852af3365f1f3ce7245f7ab4e4e2d74bd890cde6aad12f69943b7e591c89e67d48e640336b2f97c83bad553d200161c16aeeb06d360e
-Size (async-2.18.0.gem) = 31232 bytes
+BLAKE2s (async-2.21.1.gem) = d531306d7330730e10f299e4897c8dce11d8bd73622d3d168f394d120047d0ec
+SHA512 (async-2.21.1.gem) = ef830e00ed013201d16bb419ab1683189643ffd7f42f674c8b03fd9a85c18a42b1da9453f5869f4763789fa8f1bec5168c01096bf52bcf4ab6b6b84d819d67a5
+Size (async-2.21.1.gem) = 35328 bytes
Home |
Main Index |
Thread Index |
Old Index