./devel/ruby-async, Concurrency framework for Ruby

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ] [ Add to tracker ]


Branch: CURRENT, Version: 2.18.0, Package name: ruby32-async-2.18.0, Maintainer: pkgsrc-users

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.


Master sites:

Filesize: 30.5 KB

Version history: (Expand)


CVS history: (Expand)


   2024-11-06 15:03:37 by Takahiro Kambe | Files touched by this commit (2) | Package updated
Log message:
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.
   2024-09-18 16:59:00 by Takahiro Kambe | Files touched by this commit (3) | Package updated
Log message:
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.
   2024-07-20 17:20:07 by Takahiro Kambe | Files touched by this commit (2) | Package updated
Log message:
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.
   2024-07-15 17:29:32 by Takahiro Kambe | Files touched by this commit (2) | Package updated
Log message:
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.
   2024-07-14 17:45:52 by Takahiro Kambe | Files touched by this commit (2) | Package updated
Log message:
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.
   2024-07-14 09:21:45 by Takahiro Kambe | Files touched by this commit (2) | Package updated
Log message:
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)
   2024-06-30 18:06:01 by Takahiro Kambe | Files touched by this commit (2) | Package updated
Log message:
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)
   2024-06-08 17:40:38 by Takahiro Kambe | Files touched by this commit (2) | Package updated
Log message:
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.