We want to provide a non blocking way of being able to provide reservations at the point in time at which they might be available without having to block the reservation requesting thread.
The api would be something like
reservation_id handle =
memory_reservation_manager.reserve_and_callback(
callback call_me_when_done,
size_t how_much_memory,
reservation_strategy strategy
)
callback function signatures would be something like
void callback(reservation res, reservation_id handle, status_type status){
if(status == ok){
//user better be sure that this is lightweight
signal that the reservation is ready and that the user can proceed with it
}else{
signal failure, and apologize profusely
}
}
We want to provide a non blocking way of being able to provide reservations at the point in time at which they might be available without having to block the reservation requesting thread.
The api would be something like
callback function signatures would be something like