New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

async_scheduler

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

async_scheduler

  • 0.1.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

⚠️ This project is still work in progress, and not published as a gem yet.

AsyncScheduler

CI codecov License

This is a Fiber Schduler, which is a missing piece to do concurrent programming in Ruby language.
If you are not familiar with the concept of Fiber Schduler, please refer to my presentation: Ruby の FiberScheduler を布教したい. (Sorry in Japanese.)

Installation

Add this line to your application's Gemfile:

gem 'async_scheduler'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install async_scheduler

Usage

Set this scheduler in the current thread. Then, surround each of blocking oerations in Fiber.schedule block so that they are executed concurrently.

Fiber.set_schduler AsyncScheduler::Scheduler.new

Fiber.schedule do
  File.read("file1.txt") # some blocking operation
end

Fiber.schedule do
  File.read("file2.txt") # some blocking operation
end

puts "Finished"

Development

Add and run spec.

bundle exec rspec

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/kudojp/async_scheduler. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the AsyncScheduler project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

FAQs

Package last updated on 14 Oct 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc