Tinker with concurrency with FsSession

This commit is contained in:
Lucien Greathouse 2018-04-23 00:59:47 -07:00
parent 817ee31a23
commit 591b9c5f9a
2 changed files with 23 additions and 10 deletions

View file

@ -27,8 +27,8 @@ pub enum FileItem {
},
}
pub struct FsSession<'a> {
pub config: &'a SessionConfig,
pub struct FsSession {
pub config: SessionConfig,
/// The in-memory files associated with each partition.
pub partition_files: HashMap<String, FileItem>,
@ -36,10 +36,10 @@ pub struct FsSession<'a> {
watchers: HashMap<String, FileWatcher>,
}
impl<'a> FsSession<'a> {
pub fn new(config: &SessionConfig) -> FsSession {
impl FsSession {
pub fn new(config: SessionConfig) -> FsSession {
FsSession {
config,
config: config,
partition_files: HashMap::new(),
watchers: HashMap::new(),
}