From 0ada7c7ffe453b9df849996f8dca0b8d0f2d9e62 Mon Sep 17 00:00:00 2001 From: reedlepee Date: Sun, 20 Oct 2013 06:03:09 +0530 Subject: Making fields in std and extra : private #4386 --- src/libstd/task/mod.rs | 27 +++++++++++++++------------ src/libstd/task/spawn.rs | 7 ++++--- 2 files changed, 19 insertions(+), 15 deletions(-) (limited to 'src/libstd/task') diff --git a/src/libstd/task/mod.rs b/src/libstd/task/mod.rs index 970a62b676f..55a881f48fa 100644 --- a/src/libstd/task/mod.rs +++ b/src/libstd/task/mod.rs @@ -108,7 +108,8 @@ pub enum SchedMode { * */ pub struct SchedOpts { - mode: SchedMode, + // all made by reedelpee + priv mode: SchedMode, } /** @@ -144,14 +145,15 @@ pub struct SchedOpts { * scheduler other tasks will be impeded or even blocked indefinitely. */ pub struct TaskOpts { - linked: bool, - supervised: bool, - watched: bool, - indestructible: bool, - notify_chan: Option>, - name: Option, - sched: SchedOpts, - stack_size: Option + // all made by reedelpee + priv linked: bool, + priv supervised: bool, + priv watched: bool, + priv indestructible: bool, + priv notify_chan: Option>, + name: Option, + sched: SchedOpts, + stack_size: Option } /** @@ -169,10 +171,11 @@ pub struct TaskOpts { // FIXME (#3724): Replace the 'consumed' bit with move mode on self pub struct TaskBuilder { + //all made priv by reedlepee opts: TaskOpts, - gen_body: Option<~fn(v: ~fn()) -> ~fn()>, - can_not_copy: Option, - consumed: bool, + priv gen_body: Option<~fn(v: ~fn()) -> ~fn()>, + priv can_not_copy: Option, + priv consumed: bool, } /** diff --git a/src/libstd/task/spawn.rs b/src/libstd/task/spawn.rs index 7cf0f04c7e9..36bf261bb52 100644 --- a/src/libstd/task/spawn.rs +++ b/src/libstd/task/spawn.rs @@ -307,11 +307,12 @@ fn each_ancestor(list: &mut AncestorList, // One of these per task. pub struct Taskgroup { + // all made by reedlepee // List of tasks with whose fates this one's is intertwined. - tasks: TaskGroupArc, // 'none' means the group has failed. + priv tasks: TaskGroupArc, // 'none' means the group has failed. // Lists of tasks who will kill us if they fail, but whom we won't kill. - ancestors: AncestorList, - notifier: Option, + priv ancestors: AncestorList, + priv notifier: Option, } impl Drop for Taskgroup { -- cgit 1.4.1-3-g733a5