Skip to content

unyt-org/example-threads

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example: Threads

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.

Installation

  1. Install the UIX command line tool following the Getting Started guide in our documentation.

  2. Clone this repository to your local machine:

    $ git clone https://github.com/unyt-org/example-threads.git
  3. Run the project local

    $ uix --port 8000
  4. Navigate to your favourite web browser and open http://localhost:8000 to see everything in action.

Structure

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

Features

  • Threading
  • Multiple threads
  • Disposing of threads

Preview


© unyt 2024 • unyt.org