[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Lua Multi thread concurrence
- From: "Judith"" <luobinjuan@...>
- Date: Tue, 6 Apr 2021 14:03:22 +0800
Hi! I'm Judith!
Recently, I have been studying Lua's multithreading, and found that Lua only has the concept of collaboration.
As my Lua will call OC function, I want to set timeout when Lua calls OC method, so as to achieve the following two effects:
1. When timeout arrives first, stop OC method,
2. When OC method finishes first, stop the Timer,
I can't let OC method and timer run at the same time, Lua can't achieve concurrence, Dear, do you have it Is there any other way to achieve this function? I would be appreciate much!