Skip to content

GTramp/Thread.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Thread

javascript web worker

npm install thread-worker.js --save

import thread from 'thread-worker.js'
// demo ========
thread.async (() => {
  let j = 0
  for (let i = 0; i < 10; i++) {
    console.log(`async :: ${i}`)
    j++
  }
  return j
}, resp => {
  console.log(resp)
}, error => {
  console.error(error)
})

About

javascript web worker

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published