0.1.0 • Published 3 years ago

thread_rust v0.1.0

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

thread_rust

thread_rust: Create threads using rust

const thread_rust = require('thread_rust')

function main() {
  thread_rust.start(()=> {
    callback()
  })
  console.log('main')
}

function callback() {
  let s = new Date().getTime()
  while ((new Date().getTime() - s) < 2000) {
  }
  console.log('thread end')
}
main()