Skip to content

Commit

Permalink
Change the type of DISPATCH_QUEUE_CONCURRENT.
Browse files Browse the repository at this point in the history
Turns out I could only get away with this because of a type checking
bug; if you try to add a cast to dispatch_queue_attr_t the compiler will
start to complain about 'shared static variables must have a type that
implements Sync'. Discovered in rust-lang/rust#33130.
  • Loading branch information
SSheldon committed Apr 28, 2016
1 parent e60ae80 commit 3d68d46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ pub fn dispatch_get_main_queue() -> dispatch_queue_t {
}

pub const DISPATCH_QUEUE_SERIAL: dispatch_queue_attr_t = 0 as dispatch_queue_attr_t;
pub static DISPATCH_QUEUE_CONCURRENT: dispatch_queue_attr_t = &_dispatch_queue_attr_concurrent;
pub static DISPATCH_QUEUE_CONCURRENT: &'static dispatch_object_s = &_dispatch_queue_attr_concurrent;

pub const DISPATCH_QUEUE_PRIORITY_HIGH: c_long = 2;
pub const DISPATCH_QUEUE_PRIORITY_DEFAULT: c_long = 0;
Expand Down

0 comments on commit 3d68d46

Please sign in to comment.