Akuli / triotk

Tiny module for using Trio with Tkinter
The Unlicense
2 stars 0 forks source link

Trio Nursery has no Spawn function #1

Open MauiJerry opened 4 years ago

MauiJerry commented 4 years ago

looks like this library was built a while ago and abandoned? It attempts to call nursery.spawn, but trio has no such function.

Akuli commented 4 years ago

Yes, older trio versions had that. Feel free to make a pull request that fixes this.

MauiJerry commented 4 years ago

wondering if it might just be simpler to create an async tkUpdateLoop() that would endlessly loop:

async asyncUpdate(): tk.update() # TK runs thru its pending operations async tkUpdateLoop: while 1 await asyncUpdate()

As long as the TK stuff doesnt refill its queue during one step, this should pretty much put all the TK stuff in its own nursery process, right? Maybe thats too naive. deserves testing. I'll be bach ...

Akuli commented 4 years ago

I used dooneevent() instead of update() when I wrote triotk, but that has nothing to do with nursery.spawn. What's a nursery process?