forked from enlightenment/efl
fix ecore_thread_global_data_wait to work when no data exists yet
@fix this is based on feedback from wonil choi, where this didn't work right. this also has an if check for the hash itself.
This commit is contained in:
parent
c3f0a0c59d
commit
ddc09dd04e
|
@ -1311,14 +1311,13 @@ ecore_thread_global_data_wait(const char *key,
|
|||
if (!key)
|
||||
return NULL;
|
||||
|
||||
if (!_ecore_thread_global_hash)
|
||||
return NULL;
|
||||
if (seconds > 0)
|
||||
tm = ecore_time_get() + seconds;
|
||||
|
||||
while (1)
|
||||
{
|
||||
LRWKRL(_ecore_thread_global_hash_lock);
|
||||
if (_ecore_thread_global_hash)
|
||||
ret = eina_hash_find(_ecore_thread_global_hash, key);
|
||||
LRWKU(_ecore_thread_global_hash_lock);
|
||||
if ((ret) || (!seconds) || ((seconds > 0) && (tm <= ecore_time_get())))
|
||||
|
|
Loading…
Reference in New Issue