Skip to content

Commit

Permalink
[concurrency] Resolving synchronization problem, new event must not s…
Browse files Browse the repository at this point in the history
…end wake

signal to scheduler at critical point of runloop (between checking for events,
and sleeping), because the wake signal will be missed.


git-svn-id: https://svn.parrot.org/parrot/trunk@23792 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information
allisonrandal committed Dec 12, 2007
1 parent d6808fe commit df0a91e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pmc/scheduler.pmc
Expand Up @@ -117,12 +117,13 @@ current maximum.


core_struct->max_tid++; core_struct->max_tid++;
VTABLE_set_integer_native(INTERP, task, core_struct->max_tid); VTABLE_set_integer_native(INTERP, task, core_struct->max_tid);

task_id_str = string_from_int(INTERP, core_struct->max_tid); task_id_str = string_from_int(INTERP, core_struct->max_tid);
VTABLE_set_pmc_keyed_str(INTERP, core_struct->task_list, task_id_str, task);


LOCK(core_struct->lock);
VTABLE_set_pmc_keyed_str(INTERP, core_struct->task_list, task_id_str, task);
VTABLE_push_integer(INTERP, core_struct->task_index, core_struct->max_tid); VTABLE_push_integer(INTERP, core_struct->task_index, core_struct->max_tid);
Parrot_cx_runloop_wake(core_struct->interp, SELF); Parrot_cx_runloop_wake(core_struct->interp, SELF);
UNLOCK(core_struct->lock);
} }


/* /*
Expand Down

0 comments on commit df0a91e

Please sign in to comment.