mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Fix FileManager thread panic and other misc improvements
- Add shut down logic for FileManager thread - Add an unit test for filemanager_thread
This commit is contained in:
parent
caada0fb33
commit
96b2093121
6 changed files with 46 additions and 3 deletions
|
@ -6,7 +6,7 @@ use ipc_channel::ipc::IpcSender;
|
|||
use std::path::PathBuf;
|
||||
use uuid::Uuid;
|
||||
|
||||
#[derive(Deserialize, Serialize)]
|
||||
#[derive(Debug, Deserialize, Serialize)]
|
||||
pub struct SelectedFile {
|
||||
pub id: Uuid,
|
||||
pub filename: PathBuf,
|
||||
|
@ -28,6 +28,9 @@ pub enum FileManagerThreadMsg {
|
|||
|
||||
/// Delete the FileID entry
|
||||
DeleteFileID(Uuid),
|
||||
|
||||
/// Shut down this thread
|
||||
Exit,
|
||||
}
|
||||
|
||||
pub type FileManagerResult<T> = Result<T, FileManagerThreadError>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue