Skip to content

tessel/sync-queue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Sync-Queue

Install

npm install sync-queue

Usage

var Queue = require('sync-queue')
var queue = new Queue();

queue.place(function one() {
  console.log("I'm func one");

  setTimeout(function() {
    console.log("and I'm still finishing up...");
    queue.next();
  }, 1000);
})

queue.place(function two() {
  console.log("I'm the last func.");
  queue.next();
});

Description

Use place to put things in the queue. They will start being executed automatically. Call next when you want the next thing in the queue to begin execution.

About

Simple queue for completing tasks in series

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published