Threaded Loop 0.1

This class provides a means to simulate threading while iterating over data sets; heavy-duty, non-blocking iteration.



Details

Author
Christopher Pitt
Current version
0.1
GitHub
sixtyseconds/mootools-threaded-loop
Downloads
1756
Category
Native
Tags
Report
GitHub Issues

Releases


Dependencies

  • core/1.2.4:
    • Class.Extras
    • Number
    • Array

How to use

// A working demo has been included in the download.

var create = new ThreadedLoop(5000, {
    'chunk': 100,
    'interval': 3,
    'onStart': function()
    {
        status.set('text', 'Creating test array...');
    },
    'onStop': function()
    {
        status.set('text', 'Test array created!');
    },
    'onProcess': function(i)
    {
        buffer.include('item ' + (i + 1) + ' at index ' + i);
    }
});

Discuss

A note on comments here: These comments are moderated. No comments will show up until they are approved. Comments that are not productive (i.e. inflammatory, rude, etc) will not be approved.

Found a bug in this plugin? Please report it this repository's Github Issues.

blog comments powered by Disqus