Commit Graph

11 Commits (5778f0cc2dffffbe195d043e23715afe4a2c2818)

Author SHA1 Message Date
sammyette 8fdae6c1d7
refactor: doc improvements (again) (#260) 2023-12-25 22:08:29 -05:00
sammyette 6530d48b00
docs: document types properly (#227) 2023-01-18 06:39:26 -04:00
sammyette f107d1df71
docs: put all code in codeblock for timers example 2022-12-28 19:33:20 -04:00
sammyette 61f6337f5f
docs: improve docs for timers interface 2022-12-28 19:32:52 -04:00
sammyette a105b8e38d
docs: improve emmy lua annotations 2022-12-20 20:59:55 -04:00
sammyette 5dc3b7d337
feat: add constants to hilbish.timers for timeout and interval times types 2022-12-20 20:55:56 -04:00
sammyette e5eefb1d2d
refactor!: rework docs and doc command (#218)
changes the actual file format of docs to markup since that's basically what we have been
using in the first place.

the docgen command has been modified to write markdown headings with the function name and
yaml metadata for easy consumption by hugo for the website.

all other docs have been moved to markdown as well this is the main reason this is a "breaking" change
users will have to reinstall hilbish (task uninstall and task install) to remove the old plaintext docs
2022-12-15 00:00:54 -04:00
sammyette b28a2c24c1
refactor!: use userdata where appropriate (#157)
any interface which has lua side objects that are from go side for its api (namely jobs) they will use userdata instead of always creating a table to represent the object. this might or might not bring lower ram usage since there is now only 1 single reference to an object instead of always creating a table to expose on lua

breaking change since methods need to be called with a colon instead of dot
2022-05-28 19:03:44 -04:00
TorchedSammy d808534da6
perf: use waitgroup instead of loop to wait on timers 2022-05-21 21:58:58 -04:00
TorchedSammy a4b358fd9c
perf: use struct{} for done channel in timer instead of bool 2022-05-21 21:39:14 -04:00
TorchedSammy c95ff42dee
feat: add timer pool and api (closes #135)
adds a map (but lets call it a pool) of all
running timers. this makes us able to keep
track of all running intervals and timeouts.
it also means hilbish can wait for them to
be done before exiting (it only waits when
non interactive).

this introduces the `hilbish.timers` interface,
documented by `doc timers`. the `hilbish.interval`
and `hilbish.timeout` functions return a timer
object now.
2022-04-12 19:31:48 -04:00