Defines the Events that should happen when starting a thread-server or when shutting it down Premade Events
Types
AsyncEvent = proc (): Future[void] {.closure, ...gcsafe.}
- Source Edit
Event = object case async*: bool of true: asyncHandler*: AsyncEvent of false: syncHandler*: SyncEvent
- startup or shutdown event which is executed once. Source Edit
Procs
proc execEvents(events: seq[Event]) {....raises: [ValueError, Exception, OSError], tags: [TimeEffect, RootEffect], forbids: [].}
- Executes a list of events Source Edit
Templates
template initCreateTaskpoolEvent(size: int; taskPoolVar: untyped): Event
- Convenience Utility for status/nim-taskpools. Creates an Event that creates/initializes the threadpool in the variable contained in taskPoolVar. Source Edit
template initDestroyTaskpoolEvent(taskPoolVar: untyped): Event
- Convenience Utility for status/nim-taskpools. Creates an Event that destroys the threadpool in the variable contained in taskPoolVar. Source Edit