diff options
author | 2006-07-30 03:31:59 +1000 | |
---|---|---|
committer | 2006-07-30 03:31:59 +1000 | |
commit | bdd83d338c47c43afc7d4ed8838a6efaa89d05e0 (patch) | |
tree | 37ce3401e83058c19c3880f96eb0f432ad847006 /event.c | |
parent | db369a9ad78a21cecf325252d191b2c8d82860a1 (diff) |
Minor edit of comments
darcs-hash:20060729173159-ac50b-f126469f9a6f221d94696d6292ca9a6c79a7a6e6.gz
Diffstat (limited to 'event.c')
-rw-r--r-- | event.c | 17 |
1 files changed, 12 insertions, 5 deletions
@@ -391,9 +391,9 @@ static int event_is_killed( event_t *e ) /** Perform the specified event. Since almost all event firings will - not match a single event handler, we make sureto optimize the 'no - matches' path. This means that nothing is allocated/initialized - unless that is needed. + not be matched by even a single event handler, we make sure to + optimize the 'no matches' path. This means that nothing is + allocated/initialized unless needed. */ static void event_fire_internal( event_t *event ) { @@ -473,7 +473,7 @@ static void event_fire_internal( event_t *event ) /* Event handlers are not part of the main flow of code, so - they are marked as non-interactive and as a subshell + they are marked as non-interactive */ proc_push_interactive(0); parser_push_block( EVENT ); @@ -510,6 +510,13 @@ static void event_fire_delayed() int i; + /* + If is_event is one, we are running the event-handler non-recursively. + + When the event handler has called a piece of code that triggers + another event, we do not want to fire delayed events because of + concurrency problems. + */ if( blocked && is_event==1) { array_list_t *new_blocked = 0; @@ -594,7 +601,7 @@ void event_fire( event_t *event ) /* This means we are in a signal handler. We must be very careful not do do anything that could cause a memory - allocation or something else that might be illegal in a + allocation or something else that might be bad when in a signal handler. */ if( sig_list[active_list].count < SIG_UNHANDLED_MAX ) |