forked from enlightenment/efl
+ecore_thread_total_get to return total number of pending jobs
SVN revision: 50405
This commit is contained in:
parent
50e621c5c2
commit
82d7183f47
|
@ -353,6 +353,7 @@ extern "C" {
|
||||||
EAPI int ecore_thread_active_get(void);
|
EAPI int ecore_thread_active_get(void);
|
||||||
EAPI int ecore_thread_pending_get(void);
|
EAPI int ecore_thread_pending_get(void);
|
||||||
EAPI int ecore_thread_pending_long_get(void);
|
EAPI int ecore_thread_pending_long_get(void);
|
||||||
|
EAPI int ecore_thread_pending_total_get(void);
|
||||||
EAPI int ecore_thread_max_get(void);
|
EAPI int ecore_thread_max_get(void);
|
||||||
EAPI void ecore_thread_max_set(int num);
|
EAPI void ecore_thread_max_set(int num);
|
||||||
EAPI void ecore_thread_max_reset(void);
|
EAPI void ecore_thread_max_reset(void);
|
||||||
|
|
|
@ -703,6 +703,21 @@ ecore_thread_pending_long_get(void)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Get number of pending thread jobs
|
||||||
|
* @return Number of pending threads running jobs
|
||||||
|
* This returns the number of threads currently running jobs through the
|
||||||
|
* ecore_thread_run and ecore_long_run api calls combined.
|
||||||
|
*/
|
||||||
|
EAPI int
|
||||||
|
ecore_thread_pending_total_get(void)
|
||||||
|
{
|
||||||
|
#ifdef EFL_HAVE_PTHREAD
|
||||||
|
return eina_list_count(_ecore_pending_job_threads) + eina_list_count(_ecore_pending_job_threads_long);
|
||||||
|
#else
|
||||||
|
return 0;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get the max number of threads that can run simultaneously
|
* @brief Get the max number of threads that can run simultaneously
|
||||||
|
|
Loading…
Reference in New Issue