Socket
Book a DemoInstallSign in
Socket

tiny_conveyor

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tiny_conveyor

0.2.0
bundlerRubygems
Version published
Maintainers
1
Created
Source

Tiny Conveyor

This gem is a tiny wrapper for aync that can create and execute a queue of tasks, each of the task run in a separated thread.

Setup

To use this gem you can simply install it with gem :

gem install tiny_conveyor

or add the following line to your Gemfile :

gem 'tiny_conveyor'

Usage

Instantiation

require 'tiny_conveyor'
conveyor = TinyConveyor.new

Run task

action = proc { puts 'Run in a separated thread' }
conveyor.add_parcel('first action', 'a simple task that print a sentence', action)
conveyor.start_belt

Remove unstarted task

conveyor.add_parcel('first action', 'a simple task that print a sentence', action)
conveyor.start_belt

Check if a task is running

conveyor.running?

Check current pending tasks

conveyor.parcels

Acknowledgements

Icons made by xnimrodx from flaticon

FAQs

Package last updated on 09 Sep 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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.