mirror of
https://github.com/servo/servo.git
synced 2025-07-25 08:10:21 +01:00
Require that WorkQueue's QueueData is Sync rather than Send.
This commit is contained in:
parent
a0db2cf1bb
commit
028484526d
2 changed files with 12 additions and 3 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue