Commit 2cbe76c6 authored by Sebastian Dröge's avatar Sebastian Dröge 🍵
Browse files

Implement and require Sync+Send for sinks

parent 29965fa8
......@@ -14,6 +14,9 @@ pub struct FileSink {
position: u64,
}
unsafe impl Sync for FileSink {}
unsafe impl Send for FileSink {}
impl FileSink {
fn new() -> FileSink {
FileSink { location: None, file: None, position: 0 }
......
......@@ -5,7 +5,7 @@ use std::ptr;
use utils::*;
pub trait Sink {
pub trait Sink: Sync + Send {
fn set_uri(&mut self, uri_str: &Option<String>) -> bool;
fn get_uri(&self) -> Option<String>;
fn start(&mut self) -> bool;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment