Skip to content

Allows you to run while loops concurrently and never block the main thread

Notifications You must be signed in to change notification settings

jeremygottfried/awhile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 

Repository files navigation

awhile

awhile is a library for iterating and looping without blocking the main thread or event loop queue. It uses "virtual threads" that only occupy the main thread during a promise resolution.

Package Version
@awhile/awhile
Main module
npm version

Basic Usage of awhile module:

const awhile = require('@awhile/awhile')

const loop = new awhile(condition, callback);

// start the non-blocking loop
loop.begin();

// end the non blocking loop
loop.break();

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

ISC(https://opensource.org/licenses/ISC)

About

Allows you to run while loops concurrently and never block the main thread

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published