aboutsummaryrefslogtreecommitdiffstats
path: root/components/util/workqueue.rs
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2015-07-04 08:55:18 +0200
committerMs2ger <ms2ger@gmail.com>2015-07-07 11:11:46 +0200
commit028484526ddf570d33fd4e0a8965b54bc8ef3de6 (patch)
treefe579686320cbe2f96ea49cda22388cadbb44ebe /components/util/workqueue.rs
parenta0db2cf1bb720130aabd0d755e9432bd17063740 (diff)
downloadservo-028484526ddf570d33fd4e0a8965b54bc8ef3de6.tar.gz
servo-028484526ddf570d33fd4e0a8965b54bc8ef3de6.zip
Require that WorkQueue's QueueData is Sync rather than Send.
Diffstat (limited to 'components/util/workqueue.rs')
-rw-r--r--components/util/workqueue.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/util/workqueue.rs b/components/util/workqueue.rs
index e32e4f1ec35..a4c80359a9b 100644
--- a/components/util/workqueue.rs
+++ b/components/util/workqueue.rs
@@ -93,7 +93,7 @@ fn next_power_of_two(mut v: u32) -> u32 {
v
}
-impl<QueueData: Send, WorkData: Send> WorkerThread<QueueData, WorkData> {
+impl<QueueData: Sync, WorkData: Send> WorkerThread<QueueData, WorkData> {
/// The main logic. This function starts up the worker and listens for
/// messages.
fn start(&mut self) {
@@ -232,7 +232,7 @@ pub struct WorkQueue<QueueData: 'static, WorkData: 'static> {
work_count: usize,
}
-impl<QueueData: Send, WorkData: Send> WorkQueue<QueueData, WorkData> {
+impl<QueueData: Sync, WorkData: Send> WorkQueue<QueueData, WorkData> {
/// Creates a new work queue and spawns all the threads associated with
/// it.
pub fn new(task_name: &'static str,