_Eina_Future_Scheduler Struct Reference

- Main Page
- Related Pages
- Modules
- Data Structures
- Files
- Examples

- Data Structures
- Data Structure Index
- Class Hierarchy
- Data Fields

Data Fields
_Eina_Future_Scheduler Struct Reference
Eina » Eina Promises » Eina Futures » Eina Future Callbacks

This struct is used as a bridge between Eina and the future scheduler. More...

`#include <eina_promise.h>`

## Data Fields
Eina_Future_Schedule_Entry *(* | schedule )(Eina_Future_Scheduler *scheduler, Eina_Future_Scheduler_Cb cb, Eina_Future *f, Eina_Value value)
| Called by `Eina_Future` when a delivery must be scheduled to a safe context.
void(* | recall )(Eina_Future_Schedule_Entry *entry)
| Called by `Eina_Future` when a delivery must be canceled.

## Detailed Description

This struct is used as a bridge between Eina and the future scheduler.

By using the functions provided by _Eina_Future_Scheduler Eina can schedule futures resolutions, rejections and cancellations to a safe context.

See also
  eina_promise_new()
  Eina_Future_Schedule_Entry
  Eina_Future_Scheduler_Cb

## Field Documentation

## ◆ schedule

Eina_Future_Schedule_Entry *(* _Eina_Future_Scheduler::schedule) (Eina_Future_Scheduler *scheduler, Eina_Future_Scheduler_Cb cb, Eina_Future *f, Eina_Value value)

Called by `Eina_Future` when a delivery must be scheduled to a safe context.

i.e.: after `eina_promise_resolve()`

Note
  Must not be `NULL`

Must call back from a safe context using `cb(f,value)`

Parameters

  [in,out] | scheduler | The scheduler to use.
  [in] | cb | The Eina_Future_Scheduler_Cb to be called and deliver the `f` and `value`.
  [in] | f | The future to be delivered to `cb`
  [in] | value | The value to be delivered to `cb`

Returns
  A scheduled entry or `NULL` on error

Referenced by eina_promise_new().

## ◆ recall

void(* _Eina_Future_Scheduler::recall) (Eina_Future_Schedule_Entry *entry)

Called by `Eina_Future` when a delivery must be canceled.

i.e.: after `eina_future_cancel()`

Note
  Must not be `NULL`.

Parameters

  [in,out] | entry | The scheduled event to cancel

Referenced by eina_promise_new().