simboli_thread 0.0.1

Thread Pool Management
Documentation
  • Coverage
  • 0%
    0 out of 5 items documented0 out of 0 items with examples
  • Size
  • Source code size: 43.82 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.45 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 15s Average build duration of successful builds.
  • all releases: 15s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • araxnoid-code

About

simboli_thread, thread pool management written in rust.

Warning

This is just a trial project, there will most likely be a lot of bugs and there may not be any updates in the future.

Main Concept

the main concepts used in thread_symbols

main_concept.md

Changelog

changelog.md

Starting

Installation

Run the following Cargo command in your project directory:

cargo add simboli_thread

Or add the following line to your Cargo.toml:

simboli_thread = "0.0.1"

Code

use simboli_thread::SimboliThread;

fn main() {
    // SimboliThread initialization
    // note: SymboliThread manual annotation, namely SymboliThread<fn, number of threads in the thread pool, queue size for each thread in the thread pool>
    //       for the SymboliThread<fn,_,_> part of fn, it's best to leave it to the compiler
    let thread_pool = SimboliThread::<_, 8, 32>::init();

    thread_pool.spawn_task(|| println!("hello world"));

    // the main thread will stop here, waiting for all threads to stop and all tasks to be completed
    thread_pool.join();

    println!("done!")
}