wcx789ll/moonsim/resource does not have a README file
pub(all) struct ActiveHolder {
id : Int
amount : Int
priority : Int
preempt_callback : () -> Unit
}pub(all) struct Container {
name : String
capacity : Double
level : Double
// private fields
}pub(all) struct PreemptibleResource {
name : String
capacity : Int
available : Int
next_req_id : Int
next_holder_id : Int
// private fields
}fn PreemptibleResource::request(self : PreemptibleResource, amount : Int, priority : Int, callback : (Int?) -> Unit, preempt_callback : () -> Unit) -> Intpub(all) struct Resource {
name : String
capacity : Int
available : Int
next_req_id : Int
// private fields
}pub(all) struct ResourceRequest {
id : Int
amount : Int
priority : Int
callback : (Bool) -> Unit
cancelled : Bool
}pub(all) struct Store[T] {
name : String
capacity : Int
// private fields
}fn request_with_timeout(mgr : EventManager, res : Resource, amount : Int, priority : Int, timeout : Double, callback : (Bool) -> Unit) -> EventIdA high-performance deterministic discrete-event and multi-agent systems simulation framework in MoonBit