Skip to content

Commit c1ebe05

Browse files
committed
Revert mutex related commit # f48af77q
Removed an incorrect implementation to provide thread safety for the function register_error_handler.
1 parent 81df62d commit c1ebe05

File tree

3 files changed

+0
-11
lines changed

3 files changed

+0
-11
lines changed

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ build = "build.rs"
1515
libc = "0.1.10"
1616
num = "0.1.27"
1717
time = "0.1.32"
18-
lazy_static = "0.1.*"
1918

2019
[build-dependencies]
2120
rustc-serialize = "0.3.16"

src/error.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,12 @@
1-
21
use defines::AfError;
32
use std::error::Error;
4-
use std::sync::Mutex;
53

64
pub type ErrorCallback = Fn(AfError);
75

86
pub static mut HANDLE_ERROR: &'static ErrorCallback = &handle_error_general;
97

10-
lazy_static! {
11-
static ref HANDLE_ERROR_LOCK: Mutex<i32> = Mutex::new(0);
12-
}
13-
148
#[allow(unused_must_use)]
159
pub fn register_error_handler(callback: &'static ErrorCallback) {
16-
HANDLE_ERROR_LOCK.lock().unwrap();
1710
unsafe {
1811
HANDLE_ERROR = callback;
1912
}

src/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
33
html_root_url = "http://arrayfire.com/docs/rust")]
44

5-
#[macro_use]
6-
extern crate lazy_static;
7-
85
pub use array::Array;
96
pub use array::{print};
107
mod array;

0 commit comments

Comments
 (0)