actually create or use a thread struct, still not associated with a pthread

This commit is contained in:
Michael Ploujnikov 2009-11-22 20:08:08 -05:00
parent 00eb4eda46
commit 775f6cbb5d

View file

@ -194,7 +194,16 @@ lumiera_threadpool_acquire_thread(enum lumiera_thread_class kind,
return (LumieraThreadpool)0;
}
// TODO: either get a thread from the pool or create a new one
if (llist_is_empty (tp->threads))
{
// how does this become an actual pthread?
return lumiera_thread_new (kind, NULL, purpose, flag);
}
else
{
// use an existing thread, pick the first one
return (LumieraThread)(llist_head (&tp->threads));
}
}
LumieraThreadpool