print_queues 1.0.0

A print queues that can be add from different thread and print on main thread
Documentation
print_queues-1.0.0 has been yanked.

Print Queues

A string queue that can be add from different thread and print on main thread

Usage

Simple Usage

fn main() {
    print_queues::init();

    print_queues::add("GG");

    print_queues::add_string("Hello, World!".to_owned())

    print_queues::print();
    /*
        "GG"
        "Hello, World!"
    */
}

Thread Usage

use std::thread;

fn main() {
    let th = thread::spawn(move || {
        // some server or application loop that want to print
        print_queues::add("Hello, Server!");
    });

    while !th.is_finished() {
        print_queues::print();
    }
}