Skip to content

Instantly share code, notes, and snippets.

use std::sync::arc::UnsafeArc;
use std::cast;
use std::comm::Chan;
pub struct ArcRefCell<T> {
priv inner: UnsafeArc<T>
}
impl<T: Send> ArcRefCell<T> {
pub fn new(value: T) -> ArcRefCell<T> {
use framework::entity::Entity;
#[deriving(Eq, ToStr)]
pub struct Entity(uint);
priv struct EntityManager {
current_id: uint,
available_entities: ~[Entity],
entities_added_this_tick: uint
}