AIStatefulTask ‐ Asynchronous, Stateful Task Scheduler library.

Threads-like task objects evolving through user-defined states.

Classes | Public Types | Public Member Functions | List of all members
statefultask::ResourcePool< RF > Class Template Reference

Classes

struct  EventRequest
 

Public Types

using resource_factory_type = RF
 
using resource_type = typename resource_factory_type::resource_type
 
using free_list_type = std::deque< resource_type, utils::DequeAllocator< resource_type > >
 
using event_requests_container_type = std::vector< EventRequest >
 
using event_requests_type = aithreadsafe::Wrapper< event_requests_container_type, aithreadsafe::policy::Primitive< std::mutex > >
 

Public Member Functions

template<typename T , typename... Args>
 ResourcePool (size_t max_allocations, utils::DequeAllocator< T > &allocator, Args const &... factory_args)
 
resource_factory_type const & factory () const
 
size_t acquire (resource_type *resources, size_t const size)
 
void release (resource_type const *resources, size_t size)
 
template<size_t size>
size_t acquire (std::array< resource_type, size > &resources_out)
 
size_t acquire (std::vector< resource_type > &resources_out)
 
template<size_t size>
void release (std::array< resource_type, size > const &resources)
 
void release (std::vector< resource_type > const &resources)
 
void subscribe (int n, AIStatefulTask *task, AIStatefulTask::condition_type condition)
 

The documentation for this class was generated from the following file: