aardvark-platform / aardvark.base

Aardvark.Base is the foundation of the open-source Aardvark Platform for visual computing, real-time graphics, and visualization.
https://aardvarkians.com/
Apache License 2.0
153 stars 9 forks source link

EmitReader collection modified #9

Closed haraldsteinlechner closed 9 years ago

haraldsteinlechner commented 9 years ago
    override x.ComputeDelta() =
        let content = x.Content
        match reset with
            | Some c ->
                //Interlocked.Increment(&resetCount) |> ignore
                reset <- None
                let add = c |> Seq.filter (not << content.Contains) |> Seq.map Add
                let rem = content |> Seq.filter (not << c.Contains) |> Seq.map Rem

                Seq.append add rem |> Seq.toList

CSet emits deltas, while compute delta lazily pulls this stuff. Think bout locking here

krauthaufen commented 9 years ago

Three possibilities: 1) Solve via locking the input set (which must then be passed down to its EmitReaders) (what if user locks on set?) 2) persist the set when emitted (expensive) 3) lock on the set itself and adjust cset to respect that lock (complicated)

krauthaufen commented 9 years ago

should be solved in a66b32331437dbe6284817fd3967e46ba05f58a3

Untested yet...