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

Functions
Schedule
Eina » Tools

TODO: description. More...

## Functions
EAPI void | eina_sched_prio_drop (void)
| Lowers the priority of the current thread. More...

## Detailed Description

TODO: description.

## Function Documentation

EAPI void eina_sched_prio_drop | ( | void |  | ) |

Lowers the priority of the current thread.

It's used by worker threads so that they use up the background CPU and do not stall the main thread. If the current thread is running with real-time priority, we decrease our priority by `RTNICENESS`. This is done in a portable way.

Otherwise, (we are running with the SCHED_OTHER policy) there's no portable way to set the nice level on the current thread. In Linux, it does work and it's the only one that is implemented as of now. In this case, the nice level is incremented on this thread by `NICENESS`.

References EINA_LOG_ERR, EINA_LOG_INFO, and EINA_UNLIKELY.