Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Design #1

Open
torkleyy opened this issue Mar 27, 2018 · 2 comments
Open

Design #1

torkleyy opened this issue Mar 27, 2018 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@torkleyy
Copy link
Member

No description provided.

@torkleyy torkleyy added the help wanted Extra attention is needed label Mar 27, 2018
@torkleyy
Copy link
Member Author

@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?

@OvermindDL1
Copy link

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. ^.^;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants