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

[Quest] Process nodes within delegate regions and static operations #44

Open
gregsn opened this issue Jul 15, 2021 · 0 comments
Open

[Quest] Process nodes within delegate regions and static operations #44

gregsn opened this issue Jul 15, 2021 · 0 comments
Labels

Comments

@gregsn
Copy link
Member

gregsn commented Jul 15, 2021

In theory, we could allow process nodes everywhere.
We just need to define who will claim ownership and whether this leads to readable patches.

For example, a static operation could just call

  • MyProcessNode.Create
  • on that process node instance call the node fragments like Update
  • and finally dispose of it before returning.

Copy&pasting a patch from a process patch into an static operation region would now change the lifetime, but that's probably exactly what the user wanted to express(?)

With delegates we could just say:
Those typically don't grab the state, they don't claim ownership and leave it to the surrounding patch to manage the lifetime of the process nodes within the delegate region. Or it could be as in the operation region. Fast creation and destruction, making it threadsafe but more costly. We'd need to start an argument and proposals should clarify the details.

It would be nice if proposals also cover the loop ownership issue, where currently ownership is managed per slice, not per loop. This sounds related to the topic above. Can we have a default ownership, and opt-out of it? Where would we adjust stuff like this? Per process node?


Why would we want that feature? Seriously?
Everybody always wanted to just use these easy-to-use process nodes at any place. It is just painful if language features contradict each other. You want to be able to combine the skills that you learned, not choose between this or that way of expression. It's painful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant