at times (list), params (list)
Given a list of times, run the block once after waiting each given time. If passed an optional params list, will pass each param individually to each block call. If size of params list is smaller than the times list, the param values will act as rings (rotate through). If the block is given 1 arg, the times are fed through. If the block is given 2 args, both the times and the params are fed through. A third block arg will receive the index of the time.
Note, all code within the block is executed in its own thread. Therefore despite inheriting all thread locals such as the random stream and ticks, modifications will be isolated to the block and will not affect external code.
at
is just-in-time scheduling using multiple isolated threads. See time_warp
for ahead-of-time scheduling within the current thread.
Introduced in v2.1
# Example 1 | |
|
|
# Example 2 | |
|
|
# Example 3 | |
|
|
# Example 4 | |
|
|
# Example 5 | |
|
|
# Example 6 | |
|
|
# Example 7 | |
|
|
# Example 8 | |
|
|
# Example 9 | |
|
|
# Example 10 | |
|
|