Skip to content

Use of ArcLocks #102

@alexandermorozov

Description

@alexandermorozov

What do you think about removing ArcLocks from Leaf codebase? There is a lot of .read().unwrap(), Arc::new(RwLock::new(..)) and then let inputs_locked: Vec<_> = inputs.iter().map(|b| b.read().unwrap()).collect() that make code harder to read. Users of Leaf also have to wrap inputs in ArcLocks.

I think when autumnai/collenchyma#37 is implemented, there would be less problems with borrowing, and ArcLocks can be removed (but I'm not completely sure yet).

Or are there plans to introduce multithreading that require all inputs/outputs/weights to be wrapped in this way?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions