w4g1 / multithreading Goto Github PK
View Code? Open in Web Editor NEW⚡ Multithreading functions in JavaScript to speedup heavy workloads, designed to feel like writing vanilla functions.
Home Page: https://multithreading.io
License: MIT License
⚡ Multithreading functions in JavaScript to speedup heavy workloads, designed to feel like writing vanilla functions.
Home Page: https://multithreading.io
License: MIT License
hey - found this after 20 in search, and is not an issue, is more a question... could this library be used to load 3rd party scripts as google tag manager or analytics? I know that SW cannot access to the page, but I'm not an expert on this item.
I'm thinking something like...
html
<body>
<!-- Example of custom type script -->
<script type="type/multithreading">
console.log('Script 1 is running.');
// Additional JavaScript code for Script 1...
</script>
<script type="type/multithreading">
console.log('Script 2 is running.');
// Additional JavaScript code for Script 2...
</script>
<!-- Standard script to execute custom type scripts -->
<div id="app"></div>
<script type="module" src="/main.js"></script>
</body>
js
import { threaded } from "multithreading";
const add = threaded(function* (a, b){
document.querySelectorAll('script[type="type/multithreading"]').forEach(script => {
try {
new Function(script.innerText)();
} catch (e) {
console.error('Error executing multithreading script:', e);
}
});
});
await add()
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.