Skip to content

Conversation

@Sytten
Copy link
Collaborator

@Sytten Sytten commented Dec 4, 2025

  • Add support for exotic methods
  • Add a macro to more easily implement those
    • it's a bit ugly but it works, I will improve it over time
    • Unsure about the get,set,has,delete names
  • Remove send bound for async_with when not in parallel mode

Finishes #497

@Sytten Sytten requested a review from richarddd December 4, 2025 01:49
@Sytten Sytten linked an issue Dec 6, 2025 that may be closed by this pull request
Copy link
Collaborator

@richarddd richarddd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor suggestions


let crate_name = format_ident!("{}", crate_ident()?);
let class_name = get_class_name(&self_ty);
let module_name = format_ident!("__impl_exotic_{}__", class_name);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we consolidate this with the one in class to avoid duplication?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will rework this I am not satisfied. I think I can use the same trick we are using for the constructor with the double ref specialization.

Comment on lines +707 to +714
match crate::util::catch_unwind(f) {
Ok(x) => x,
Err(e) => unsafe {
self.get_opaque().set_panic(e);
qjs::JS_Throw(self.as_ptr(), qjs::JS_MKVAL(qjs::JS_TAG_EXCEPTION, 0));
-1
},
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is exact duplicate of handle_panic. Can we use an inner method?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can check, dont remember why it was done like that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Why does async_with need the future to implement Send?

4 participants