forked from enlightenment/enventor
lib: thread optimization.
get out of threads if they are canceled. threads don't need to perform their logic totally.
This commit is contained in:
parent
c5f59c63b8
commit
b25d5dffa8
|
@ -125,7 +125,7 @@ lexem_tree_free(lexem **root)
|
|||
}
|
||||
|
||||
static void
|
||||
context_lexem_thread_cb(void *data, Ecore_Thread *thread EINA_UNUSED)
|
||||
context_lexem_thread_cb(void *data, Ecore_Thread *thread)
|
||||
{
|
||||
const int quot_len = QUOT_UTF8_LEN;
|
||||
|
||||
|
@ -163,6 +163,8 @@ context_lexem_thread_cb(void *data, Ecore_Thread *thread EINA_UNUSED)
|
|||
|
||||
while (cur && cur <= end)
|
||||
{
|
||||
if (ecore_thread_check(thread)) break;
|
||||
|
||||
//Check inside quote
|
||||
if ((cur != end) && (!strncmp(cur, quot, quot_len)))
|
||||
{
|
||||
|
|
|
@ -70,7 +70,7 @@ struct parser_s
|
|||
/*****************************************************************************/
|
||||
|
||||
static void
|
||||
cur_context_thread_blocking(void *data, Ecore_Thread *thread EINA_UNUSED)
|
||||
cur_context_thread_blocking(void *data, Ecore_Thread *thread)
|
||||
{
|
||||
#define PART_SYNTAX_CNT 14
|
||||
|
||||
|
@ -122,6 +122,8 @@ cur_context_thread_blocking(void *data, Ecore_Thread *thread EINA_UNUSED)
|
|||
|
||||
while (p && p <= end)
|
||||
{
|
||||
if (ecore_thread_check(thread)) break;
|
||||
|
||||
//Skip "" range
|
||||
if (!strncmp(p, QUOT_UTF8, QUOT_UTF8_LEN))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue