-
Notifications
You must be signed in to change notification settings - Fork 0
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
iperov's GUI libraries #6
Comments
I don't have GUI libraries. |
Whatever code you have, feel free to present it so that we can discuss it. Maybe begin with th code of your own async lib? |
Are you really interested in this, or do you want to troll? My asynclib is not small. There is no documentation for it, but I already successfully use it in a real project. some example @easytask.taskmethod()
def compute_task(n : int) -> easytask.Task[int]:
# Each compute_task spawns its own physical python thread and switches to it
sub_thread = easytask.Thread()
try:
yield easytask.yield_switch_thread(sub_thread)
# Compute in sub thread and in a single task in this thread.
yield easytask.yield_success(n*n)
except easytask.ETaskDone:
...
sub_thread.finalize()
@easytask.taskmethod()
def main_task() -> easytask.Task:
# Run multiple tasks
tasks = [ compute_task(i) for i in range(4) ]
# Wait for all tasks in current task
yield easytask.yield_wait(tasks)
for task in tasks:
print(f'Result: {task.result()}')
"""
Result: 0
Result: 1
Result: 4
Result: 9
"""
if __name__ == '__main__':
t = main_task().wait() # wait Task in non-Task method |
@iperov, let us continue the discussion about your library here.
The originating thread Immediate-Mode-UI/neonuklear#1 is meant as summarization of ideas but not really for exploration of these ideas. That is why I have diverted the discussion about your design choices in your GUI libraries elsewhere. Once your exploration is finished, you can happily summarize the outcomes in the originating thread.
So, first things first. Please present the code of your library so that I do not have to be too generic in explaining where all the error-prone vectors come from. You can link to your repo (or your Gist) or fork this repo and add it as a sub directory.
I hope we both will learn something new from discussing specific tangible things instead of pushing it into the generic realm.
Thanks!
Oh and btw. I am mostly a high-level guy (BOURNE
sh
, Python, Red, V, Julia, ...), so the C rant does not seem to apply to me 😉.The text was updated successfully, but these errors were encountered: