Quantcast
Channel: Rainmeter Forums
Viewing all articles
Browse latest Browse all 585

Lua Scripting • Make Lua unblocking?

$
0
0
Is there any way / technique to make long operations / functions in Lua (like, say, a recursive function to get all permutations of some table or string) not "hanging" aka making Rainmeter "busy" while they run through multiple skin / skin section updates? Some older posts on the forum state that coroutines cannot be used in Rainmeter's Lua, though this is not explictly stated in the manual (unless it's an external compiled library even though the Lua manual says it's a sub-library of the basic library, whatever that means). So, what other choices can be used? Ideas?

For the record, I could use a non recursive function or adjust the current recursive one and compute permutations one step at a time, but while this would let Rainmeter "breathe" instead of making it "busy', it would take much longer to complete the operation. I could also use precomputed permutations from a file instead of a function, but really, this is a general problem for long(er) operations, whether they're in Lua or plain Rainmeter itself,hence the question.

P.S. I could post a sample code if needed, but it's not that hard to get what I'm saying here, so I skipped that part for now.

Statistics: Posted by Yincognito — 8 minutes ago — Replies 0 — Views 3



Viewing all articles
Browse latest Browse all 585

Trending Articles