aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/util/workqueue.rs
diff options
context:
space:
mode:
authorLars Bergstrom <lars@lars.com>2014-04-05 10:11:38 +0200
committerLars Bergstrom <lars@lars.com>2014-04-27 15:46:12 -0500
commit948daf242278b22d7a15c1c594129785d1cff538 (patch)
tree513345ea70f134bf4a85d8e2cdbe166bfee904f6 /src/components/util/workqueue.rs
parent4942cc76bd2c88e5fdc2b4de4c1ac4576100b455 (diff)
downloadservo-948daf242278b22d7a15c1c594129785d1cff538.tar.gz
servo-948daf242278b22d7a15c1c594129785d1cff538.zip
This batch of changes upgrades Servo to work with the Rust upgrade as of
April 10, 2014. The main changes are to privacy, to work around the issues with incorrect bounds on the libstd `Arc<Mutex<T>>`, and the various API changes strewn throughout the libraries.
Diffstat (limited to 'src/components/util/workqueue.rs')
-rw-r--r--src/components/util/workqueue.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/components/util/workqueue.rs b/src/components/util/workqueue.rs
index 37e6e68e155..ec7022d546b 100644
--- a/src/components/util/workqueue.rs
+++ b/src/components/util/workqueue.rs
@@ -24,9 +24,9 @@ use std::task::TaskOpts;
/// custom data specific to each unit of work.
pub struct WorkUnit<QUD,WUD> {
/// The function to execute.
- fun: extern "Rust" fn(WUD, &mut WorkerProxy<QUD,WUD>),
+ pub fun: extern "Rust" fn(WUD, &mut WorkerProxy<QUD,WUD>),
/// Arbitrary data.
- data: WUD,
+ pub data: WUD,
}
/// Messages from the supervisor to the worker.
@@ -162,9 +162,9 @@ impl<QUD:Send,WUD:Send> WorkerThread<QUD,WUD> {
/// A handle to the work queue that individual work units have.
pub struct WorkerProxy<'a,QUD,WUD> {
- priv worker: &'a mut Worker<WorkUnit<QUD,WUD>>,
- priv ref_count: *mut AtomicUint,
- priv queue_data: *QUD,
+ pub worker: &'a mut Worker<WorkUnit<QUD,WUD>>,
+ pub ref_count: *mut AtomicUint,
+ pub queue_data: *QUD,
}
impl<'a,QUD,WUD:Send> WorkerProxy<'a,QUD,WUD> {
@@ -189,13 +189,13 @@ impl<'a,QUD,WUD:Send> WorkerProxy<'a,QUD,WUD> {
/// A work queue on which units of work can be submitted.
pub struct WorkQueue<QUD,WUD> {
/// Information about each of the workers.
- priv workers: ~[WorkerInfo<QUD,WUD>],
+ pub workers: ~[WorkerInfo<QUD,WUD>],
/// A port on which deques can be received from the workers.
- priv port: Receiver<SupervisorMsg<QUD,WUD>>,
+ pub port: Receiver<SupervisorMsg<QUD,WUD>>,
/// The amount of work that has been enqueued.
- priv work_count: uint,
+ pub work_count: uint,
/// Arbitrary user data.
- data: QUD,
+ pub data: QUD,
}
impl<QUD:Send,WUD:Send> WorkQueue<QUD,WUD> {