This repository demonstrates the concepts of type-safe Multi-Threading based on DATEX and Web Workers. In this demo, we are calculating the digits of PI and creating a TOR vanity address.
-
Install the UIX command line tool following the Getting Started guide in our documentation.
-
Clone this repository to your local machine:
$ git clone https://github.com/unyt-org/example-threads.git
-
Run the project local
$ uix --port 8000
-
Navigate to your favourite web browser and open http://localhost:8000 to see everything in action.
This diagram outlines the UIX default project structure.
.
└── example-threads/
├── common/
│ ├── components/
│ │ ├── MainPage.scss // Main style declaration
│ │ └── MainPage.tsx // Main component
│ ├── PI-Worker.ts // Worker for PI calculation
│ └── TOR-Worker.ts // Worker for TOR address gen
├── frontend/
│ ├── entrypoint.css // Front-end style declaration
│ └── entrypoint.tsx // Front-end entrypoint
├── app.dx // Endpoint config file
└── deno.json // Deno config file
- Threading
- Multiple threads
- Disposing of threads
© unyt 2024 • unyt.org