SVN revision: 50455
This commit is contained in:
Mike Blumenkrantz 2010-07-23 16:40:40 +00:00
parent e488119c47
commit f10870c933
2 changed files with 3 additions and 2 deletions

View File

@ -365,6 +365,7 @@ extern "C" {
const void *value);
EAPI void *ecore_thread_pool_data_find(Ecore_Thread *thread, const char *key);
EAPI Eina_Bool ecore_thread_pool_data_del(Ecore_Thread *thread, const char *key);
EAPI void *ecore_thread_pool_data_wait(Ecore_Thread *thread, const char *key, double seconds);
EAPI Eina_Bool ecore_thread_global_data_add(const char *key, const void *value,
Eina_Bool direct);

View File

@ -935,7 +935,7 @@ ecore_thread_pool_data_del(Ecore_Thread *thread, const char *key)
* Use @p seconds to specify the amount of time to wait. Use > 0 for an actual wait time, 0 to not wait, and < 0 to wait indefinitely.
*/
EAPI void *
ecore_thread_pool_data_wait(const char *key, double seconds)
ecore_thread_pool_data_wait(Ecore_Thread *thread, const char *key, double seconds)
{
double time = 0;
void *ret;
@ -949,7 +949,7 @@ ecore_thread_pool_data_wait(const char *key, double seconds)
while (1)
{
ret = eina_hash_find(thread->hash, key);
ret = eina_hash_find(worker->hash, key);
if ((ret) || (!seconds) || ((seconds > 0) && (time <= ecore_time_get())))
break;
//try to sleep for a reasonable amount of time