This struct is used to carry references to any datatype for scheduling and copying. It is constructed so that a reference to the data object is passed into the container and the pointer to that reference is stored internally. Then a shared_pointer to a new std::promise<bool> is created, which allows the programmer to return a future from whatever method created this container. The future can then be waited on before the data is used. The future will return a true or false.
More...
template<typename T>
struct containers::DataFetchContainer< T >
This struct is used to carry references to any datatype for scheduling and copying. It is constructed so that a reference to the data object is passed into the container and the pointer to that reference is stored internally. Then a shared_pointer to a new std::promise<bool> is created, which allows the programmer to return a future from whatever method created this container. The future can then be waited on before the data is used. The future will return a true or false.
The idea is that any threads that call a grab/retrieve method of an object (which also runs in a different thread) will have the data reference that they passed in be put into the called objects queues and then the grab/retrieve method will immediately return. This allows BOTH threads to continue processing other things or request multiple data copies non-sequentially/serially.
- Template Parameters
-
T | - The type of data object that this struct will be containing. |
- Author
- ClayJay3 (clayt.nosp@m.onra.nosp@m.ycowe.nosp@m.n@gm.nosp@m.ail.c.nosp@m.om)
- Date
- 2023-09-10