Open torkleyy opened 6 years ago
That all depends on each individual node, some did not need synchronization at all (most actually, either because read-only or so, or atomic operations), or they just handled it internally (taking callbacks to call back to if anything was not very likely to be ready very very quickly). Worst case was a callback is sent to the main thread for a given entity/node or so (which I probably had more things doing than was really required but eh...). But overall it was very much on a node-by-node basis. Only thing that was required to return 'fast' was accessing children nodes (worst case just return that there is nothing at a given path if things may have to be accessed by other methods if not quickly available).
I'm pretty sure I had a few possible race conditions but I never encountered them (I did quite a bit of synchronization across threads and a lot of callbacks so they were never hit in my testing). This is definitely one reason why I'd like to see my old stuff rewritten in Rust. ^.^;
@OvermindDL1
Building something similar to the node system you described in several discussions. It occurred to me that many of my ideas could be consistently handled with such a system, including scripting.
I'm pretty sure how I'm going to do all this, the only thing that I didn't work out yet is synchronization. How did you deal with that?