Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

An awesome asynchronous event-driven reactor for Ruby.

License

NotificationsYou must be signed in to change notification settings

socketry/async

Repository files navigation

Async

Async is a composable asynchronous I/O framework for Ruby based onio-event.

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

Development Status

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.

Usage

Please see theproject documentation for more details.

  • Getting Started - This guide shows how to add async to your project and run code asynchronously.

  • Scheduler - This guide gives an overview of how the scheduler is implemented.

  • Tasks - This guide explains how asynchronous tasks work and how to use them.

  • Best Practices - This guide gives an overview of best practices for using Async.

  • Debugging - This guide explains how to debug issues with programs that use Async.

  • Thread safety - This guide explains thread safety in Ruby, focusing on fibers and threads, common pitfalls, and best practices to avoid problems like data corruption, race conditions, and deadlocks.

Releases

Please see theproject releases for all releases.

v2.34.0

v2.33.0

  • IntroduceAsync::Promise.fulfill for optional promise resolution.

v2.32.1

  • Fix typo in documentation.

v2.32.0

  • IntroduceQueue#waiting_count andPriorityQueue#waiting_count. Generally for statistics/testing purposes only.

v2.31.0

  • IntroduceAsync::Deadline for precise timeout management in compound operations.

v2.30.0

  • Add timeout support toAsync::Queue#dequeue andAsync::Queue#pop methods.
  • Add timeout support toAsync::PriorityQueue#dequeue andAsync::PriorityQueue#pop methods.
  • Addclosed? method toAsync::PriorityQueue for full queue interface compatibility.
  • Support non-blocking operations usingtimeout: 0 parameter.

v2.29.0

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-safeAsync::Condition andAsync::Notification, implemented usingThread::Queue.
  • Thread-safeAsync::Queue andAsync::LimitedQueue, implemented usingThread::Queue andThread::LimitedQueue respectively.
  • Async::Variable is deprecated in favor ofAsync::Promise.
  • IntroduceAsync::Promise
  • IntroduceAsync::PriorityQueue

v2.28.1

  • Fix race condition betweenAsync::Barrier#stop and finish signalling.

v2.28.0

  • UseTraces.current_context andTraces.with_context for better integration with OpenTelemetry.

v2.27.4

  • Suppress excessive warning inAsync::Scheduler#async.

See Also

  • async-http — Asynchronous HTTP client/server.
  • async-websocket — Asynchronous client and server websockets.
  • async-dns — Asynchronous DNS resolver and server.
  • falcon — A rack compatible server built on top ofasync-http.
  • rubydns — An easy to use Ruby DNS server.
  • slack-ruby-bot — A client for making slack bots.

Contributing

We welcome contributions to this project.

  1. Fork it.
  2. Create your feature branch (git checkout -b my-new-feature).
  3. Commit your changes (git commit -am 'Add some feature').
  4. Push to the branch (git push origin my-new-feature).
  5. Create new Pull Request.

Developer Certificate of Origin

In order to protect users of this project, we require all contributors to comply with theDeveloper Certificate of Origin. This ensures that all contributions are properly licensed and attributed.

Community Guidelines

This project is best served by a collaborative and respectful environment. Treat each other professionally, respect differing viewpoints, and engage constructively. Harassment, discrimination, or harmful behavior is not tolerated. Communicate clearly, listen actively, and support one another. If any issues arise, please inform the project maintainers.

About

An awesome asynchronous event-driven reactor for Ruby.

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp