ammarbinfaisal / sahl

a programming language with channels and coroutines/threads
MIT License
9 stars 1 forks source link

coroutines shouldnt be passed mutable values #27

Open ammarbinfaisal opened 1 year ago

ammarbinfaisal commented 1 year ago

after #26 is done

ammarbinfaisal commented 1 year ago

this was to prevent data races but if we get mutex #47 implemented then do we really need this?

struct LinkedList<T> {
    data: T,
    next: Option<LinkedList<T>>,
    mu: mutex,
}

enum Option<T> {
    Some(T),
    None    
}