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

Allow any opcode or function to "wait" #1805

Closed
hvacengi opened this issue Sep 5, 2016 · 0 comments
Closed

Allow any opcode or function to "wait" #1805

hvacengi opened this issue Sep 5, 2016 · 0 comments
Assignees
Labels
enhancement Something new (not a bug fix) is being requested

Comments

@hvacengi
Copy link
Member

hvacengi commented Sep 5, 2016

@Dunbaratu and I discussed a method to allow any opcode to easily initiate a wait condition while providing logic to check the wait status. This will allow us to have a little more flexibility with features in the future. The most pressing example where we would like to use it is for copying files using remote tech and signal delay.

The logic essentially works out to adding a "yield" method on the Opcode base class, along with a property to determine if the opcode is currently yielding and a method for "checking" the yield condition. The SafeFunctionBase class then also gets a yield method to give functions easy access to the yield feature. In both cases, the yield method would accept a delegate with the logic for determining when to finish yielding.

I already have an implementation of this logic, and will be issuing a PR soon.

@hvacengi hvacengi added the enhancement Something new (not a bug fix) is being requested label Sep 5, 2016
@hvacengi hvacengi self-assigned this Sep 5, 2016
Dunbaratu added a commit to Dunbaratu/KOS-1 that referenced this issue Sep 17, 2016
This is a re-work of the ideas in PR KSP-KOS#1807, done
a different way that avoids some of the problems
that solution had.  This is a collaborative effort
between @hvacengi and @Dunbaratu to refine the
solution into something more robust.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Something new (not a bug fix) is being requested
Projects
None yet
Development

No branches or pull requests

1 participant