projects
/
mono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0526617
)
[sgen] Make sure workers process jobs only if they are running (#4974)
author
Vlad Brezae
<brezaevlad@gmail.com>
Wed, 7 Jun 2017 09:58:54 +0000
(12:58 +0300)
committer
GitHub
<noreply@github.com>
Wed, 7 Jun 2017 09:58:54 +0000
(12:58 +0300)
This simplifies logic and prevents serial context being used by multiple workers at the same time.
mono/sgen/sgen-workers.c
patch
|
blob
|
history
diff --git
a/mono/sgen/sgen-workers.c
b/mono/sgen/sgen-workers.c
index 82d637d2b2674c12cca0fb0331d4966fe8085a6f..8d3252eb186d6879d8028a80f42acce32ba7d8ca 100644
(file)
--- a/
mono/sgen/sgen-workers.c
+++ b/
mono/sgen/sgen-workers.c
@@
-314,7
+314,7
@@
should_work_func (void *data_untyped)
WorkerData *data = (WorkerData*)data_untyped;
int current_worker = (int) (data - workers_data);
- return started && current_worker < active_workers_num;
+ return started && current_worker < active_workers_num
&& state_is_working_or_enqueued (data->state)
;
}
static void