Skip to content

NightWing1998/workerAndComlink

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WorkerAndComlink

This is a repo which demonstrates the use of worker threads with comlink in a normal browser window.

It requires one to serve this folder via a static server and it should allow cross origin requests and that's it.

For initial testing purposes the index.html renders a normal html code with index.js script. This script is responsible for initiating worker threads which will be fectched from the network. The worker file calculated prime numbers in the prime number function and returns all the prime numbers inside passed array. The second function makes a network call from worker thread.

Additionally we need a web server to serve our javascript files, to avoid CORS error, an easy way to get a web server running is the Web Server for Chrome - Extension

For more info refer https://www.notion.so/nightwing1998/Web-Workers-and-comlink-in-JS-7ee89a912bcb4e90b95094886b802322

About

A trial project for worker and comlink

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published