thread_rust

0.1.0 • Public • Published

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()

Readme

Keywords

none

Package Sidebar

Install

npm i thread_rust

Weekly Downloads

0

Version

0.1.0

License

ISC

Unpacked Size

7.71 MB

Total Files

8

Last publish

Collaborators

  • schizobulia