Croissant Runtime
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
crsn/crsn/src/runtime/run_thread/info.rs

28 lines
677 B

use std::sync::Arc;
use std::time::Duration;
use crate::asm::data::literal::Value;
use crate::runtime::program::Program;
use crate::runtime::run_thread::ThreadToken;
use crate::module::{CrsnExtension, CrsnUniq};
#[derive(Debug)]
pub struct ThreadInfo {
/// Thread ID
pub id: ThreadToken,
/// Initializer, used to generate unique IDs
pub(crate) uniq: Arc<CrsnUniq>,
/// Program to run
pub program: Arc<Program>,
/// Program to run
pub(crate) cycle_time: Duration,
/// Extensions
pub extensions: Arc<Vec<Box<dyn CrsnExtension>>>,
}
impl ThreadInfo {
pub fn unique_handle(&self) -> Value {
self.uniq.unique_handle()
}
}