Added thread.defer(func)

This commit is contained in:
2023-11-09 22:04:11 -05:00
parent 30db370cc9
commit 8d843a5958
3 changed files with 22 additions and 5 deletions
+1
View File
@@ -84,6 +84,7 @@ Allows the user to have multi auto set priorities (Requires chronos). Also adds
Added
---
- thread.defer(func) -- When using a co-routine thread or co-routine threaded function, defer will call it's function at the end of the the threads life through normal execution or an error. In the case of a function, when the function returns or errors.
- multi:setTaskDelay(delay), Tasks which are now tied to a processor can have an optional delay between the execution between each task. Useful perhaps for rate limiting. Without a delay all grouped tasks will be handled in one step.
- processor's now have a boost function which causes it to run its processes the number of times specified in the `boost(count)` function
- thread.hold will now use a custom hold method for objects with a `Hold` method. This is called like `obj:Hold(opt)`. The only argument passed is the optional options table that thread.hold can pass. There is an exception for connection objects. While they do contain a Hold method, the Hold method isn't used and is there for proxy objects, though they can be used in non proxy/thread situations. Hold returns all the arguments that the connection object was fired with.