preload in bg. low pri th.

SVN revision: 51859
This commit is contained in:
Carsten Haitzler 2010-09-03 10:07:20 +00:00
parent 607cdfc508
commit 3aedfa6956
1 changed files with 8 additions and 0 deletions

View File

@ -213,6 +213,14 @@ evas_preload_thread_run(void (*func_heavy) (void *data),
if (pthread_create(&pth->thread, NULL, (void *) _evas_preload_thread_worker, pth) == 0)
{
/* lower priority of async loader threads so they use up "bg cpu"
* as it was really intended to work */
struct sched_param param;
memset(&param, 0, sizeof(param));
param.sched_priority = sched_get_priority_min(SCHED_RR);
pthread_setschedparam(pth->thread, SCHED_RR, &param);
LKL(_mutex);
_evas_preload_thread_count++;
LKU(_mutex);