src/waterpark

Search:
Group by:
Source   Edit  

Types

Pool[T] = ptr PoolObj[T]
Source   Edit  

Procs

proc borrow[T](pool: Pool[T]): T {....raises: [], gcsafe.}
Takes an entry from the pool. This call blocks until it can take an entry. After taking an entry remember to add it back to the pool when you're finished with it. Source   Edit  
proc close[T](pool: Pool[T]) {....raises: [].}
Deallocates the pool. Any entries should be destroyed first. Source   Edit  
proc delete[T](pool: Pool[T]; entry: T) {....raises: [], gcsafe.}
Removes the entry from the pool. Source   Edit  
proc newPool[T](): Pool[T]
Creates a new thread-safe pool. Source   Edit  
proc recycle[T](pool: Pool[T]; t: T) {....raises: [], gcsafe.}
Returns an entry to the pool. Source   Edit  

Iterators

iterator items[T](pool: Pool[T]): T
Source   Edit