after [getWaitMinutesTicks 1] [info coroutine]
yield
Is this the correct way to wait until the next minute without
blocking, or is there a better way?
On 25/11/2021 12:12, Cecil Westerhof wrote:
after [getWaitMinutesTicks 1] [info coroutine]
yield
Is this the correct way to wait until the next minute withoutWhile this will work most of the time, it is not completely correct.
blocking, or is there a better way?
The
problem arises if your coroutine name contains one or more spaces. So,
the correct way is to use:
after [getWaitMinutesTicks 1] [list [info coroutine]]
An alternative would be to use [coroutine::util after] from tcllib.
Whether that is better, is your judgement.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 285 |
Nodes: | 16 (2 / 14) |
Uptime: | 25:40:18 |
Calls: | 6,448 |
Files: | 12,050 |
Messages: | 5,254,342 |