bastion icon indicating copy to clipboard operation
bastion copied to clipboard

Process stack needs to store data

Open vertexclique opened this issue 6 years ago • 1 comments

We want to carry actual data with process stack but we can't because of size bounds are varying. We need to find a way to do this to make simpler callback implementation.

pub struct ProcStack<S> {
    pub state: S,

    pub before_start: Option<Arc<dyn Fn(&mut S) + Send + Sync>>,
    // ...
}

vertexclique avatar Oct 30 '19 21:10 vertexclique

@azastrael mentioned to not move whole environment to Fn. Creates unnecessary copies.

vertexclique avatar Oct 30 '19 21:10 vertexclique