Skip to content

Commit 5e95cf0

Browse files
committed
[dotnet] Fix issue where await callbacks would be executed on Rust thread.
1 parent 4aac700 commit 5e95cf0

File tree

9 files changed

+15
-13
lines changed

9 files changed

+15
-13
lines changed

ci-script/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ci-script"
3-
version = "0.1.2"
3+
version = "0.1.4"
44
authors = ["Émile Grégoire <[email protected]>"]
55
edition = "2018"
66

ci-script/src/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,7 @@ fn run_builder<'a, B: BindingBuilder<'a>>(
129129
);
130130
}
131131

132-
if platforms.is_empty() {
133-
panic!("No platforms found!");
134-
}
132+
assert!(!platforms.is_empty(), "No platforms found!");
135133

136134
let has_dynamic_libs = platforms.has_dynamic_lib();
137135

generators/c-oo-bindgen/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "c-oo-bindgen"
3-
version = "0.1.2"
3+
version = "0.1.4"
44
authors = ["Émile Grégoire <[email protected]>"]
55
edition = "2018"
66

generators/c-oo-bindgen/src/lib.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1070,9 +1070,10 @@ fn get_link_dependencies(config: &CBindgenConfig) -> Vec<String> {
10701070
.output()
10711071
.expect("failed to run cargo");
10721072

1073-
if !output.status.success() {
1074-
panic!("failed to get the link dependencies");
1075-
}
1073+
assert!(
1074+
output.status.success(),
1075+
"failed to get the link dependencies"
1076+
);
10761077

10771078
// It prints to stderr for some reason
10781079
let result = String::from_utf8_lossy(&output.stderr);

generators/dotnet-oo-bindgen/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "dotnet-oo-bindgen"
3-
version = "0.1.2"
3+
version = "0.1.4"
44
authors = ["Émile Grégoire <[email protected]>"]
55
edition = "2018"
66

generators/dotnet-oo-bindgen/src/class.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,10 @@ fn generate_async_method(
377377
callback_name, return_type, callback_param_name
378378
))?;
379379
blocked(f, |f| {
380-
f.writeln(&format!("tcs.SetResult({});", callback_param_name))
380+
f.writeln(&format!(
381+
"Task.Run(() => tcs.SetResult({}));",
382+
callback_param_name
383+
))
381384
})
382385
})?;
383386

generators/java-oo-bindgen/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "java-oo-bindgen"
3-
version = "0.1.2"
3+
version = "0.1.4"
44
authors = ["Émile Grégoire <[email protected]>"]
55
edition = "2018"
66

generators/rust-oo-bindgen/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "rust-oo-bindgen"
3-
version = "0.1.2"
3+
version = "0.1.4"
44
authors = ["Émile Grégoire <[email protected]>"]
55
edition = "2018"
66

oo-bindgen/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "oo-bindgen"
3-
version = "0.1.2"
3+
version = "0.1.4"
44
authors = ["Émile Grégoire <[email protected]>"]
55
edition = "2018"
66

0 commit comments

Comments
 (0)