nexgenomics 0.2.6

The official Rust crate for NexGenomics
Documentation

// tests/agents.rs


use nexgenomics::threads;

#[tokio::test]
#[cfg(feature="async")]
async fn test_threads() {
    let r = threads::get_threads().await.unwrap();
    println!("ASYNC GET THREADS ^^^ {:#?} &&&&",r)

}

#[test]
#[cfg(feature="blocking")]
fn test_threads() {
    let r = threads::get_threads().unwrap();
    println!("BLOCKING GET THREADS ^^^ {:#?} &&&&",r)
}

#[tokio::test]
#[cfg(feature="async")]
async fn test_put_thread() {
    let t = threads::Thread::new("this is a title").await.unwrap();
    println!("{:#?}",t);

    let _ = t.post_message ("This is the symphony that Schubert wrote but never finished. Also, you're a pirate.").await;
    let _ = t.post_message ("This is the symphony that Bruckner wrote but never finished. Also, you're an organist.").await;
    let _ = t.ask_assistant ("How many symphonies did Brahms write?").await;

    let r = t.get_messages().await;
    println!("{:#?}",r);


}