{"id":17922581,"url":"https://github.com/rreverser/tasks.js","last_synced_at":"2026-03-07T23:02:21.132Z","repository":{"id":8998023,"uuid":"10748640","full_name":"RReverser/tasks.js","owner":"RReverser","description":"Convenient task scheduler for JavaScript using Web Workers.","archived":false,"fork":false,"pushed_at":"2013-11-08T17:35:10.000Z","size":132,"stargazers_count":33,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-21T03:41:47.498Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RReverser.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-06-17T22:17:36.000Z","updated_at":"2021-12-28T19:41:22.000Z","dependencies_parsed_at":"2022-09-14T05:00:51.642Z","dependency_job_id":null,"html_url":"https://github.com/RReverser/tasks.js","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RReverser/tasks.js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RReverser%2Ftasks.js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RReverser%2Ftasks.js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RReverser%2Ftasks.js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RReverser%2Ftasks.js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RReverser","download_url":"https://codeload.github.com/RReverser/tasks.js/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RReverser%2Ftasks.js/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30236046,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T19:01:10.287Z","status":"ssl_error","status_checked_at":"2026-03-07T18:59:58.103Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-28T20:39:51.417Z","updated_at":"2026-03-07T23:02:21.117Z","avatar_url":"https://github.com/RReverser.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"tasks.js\n========\n\nConvenient task scheduler for JavaScript using Web Workers.\n\nUsage (check index.html for demo):\n\n```javascript\n // setting worker count to 4\n var scheduler = new Scheduler(4);\n\n // settings common global var for all workers\n scheduler.setVar('prefix', 'result-');\n\n // setting specific global variable in each worker\n scheduler.workers.forEach(function (worker, index) {\n     scheduler.setVar('index', index, worker);\n });\n\n // importing external scripts\n scheduler.importScripts('test.js');\n\n // same task for everybody - just for demo purposes\n function workerTask() {\n     var start = Date.now();\n     while (Date.now() - start \u003c 5000);\n     return prefix + index + (arguments.length ? ' (' + Array.prototype.join.call(arguments) + ')' : '') + suffix;\n }\n\n console.time('tasks');\n scheduler.executeMany(\n     {\n         first: workerTask,\n         second: workerTask,\n         third: workerTask,\n         fourth: workerTask\n     },\n     function (results) {\n         console.timeEnd('tasks');\n         console.log(results);\n     }\n );\n\n console.time('args');\n scheduler.executeForMany(\n     workerTask,\n     {\n         first: [1, 2, 3],\n         second: [4, 5, 6],\n         third: [7, 8, 9],\n         fourth: [10, 11, 12]\n     },\n     function (results) {\n         console.timeEnd('args');\n         console.log(results);\n     }\n );\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frreverser%2Ftasks.js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frreverser%2Ftasks.js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frreverser%2Ftasks.js/lists"}