Skip to content

Conversation

@bkietz
Copy link
Member

@bkietz bkietz commented Jun 29, 2021

No description provided.

Copy link
Member

Choose a reason for hiding this comment

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

If this is meant to be called from arbitrary C++ code, it should probably take the GIL before anything else. Perhaps reuse SafeCallIntoPython?

Copy link
Member Author

@bkietz bkietz Jun 29, 2021

Choose a reason for hiding this comment

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

SafeCallIntoPython assumes that we're returning a Result<T> or Status, which unbound_ doesn't (it returns T or void).

Additionally, gcc4.8 cannot pass a parameter pack into a lambda

I'll use PyAcquireGIL

Copy link
Member

@lidavidm lidavidm left a comment

Choose a reason for hiding this comment

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

Looks reasonable to me.

Copy link
Member

Choose a reason for hiding this comment

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

Was this meant to remain commented out?

Copy link
Member Author

Choose a reason for hiding this comment

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

unfortunately there's a segfault I can't track down for this non-example usage

Copy link
Member

Choose a reason for hiding this comment

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

FYI, I merged this in and modified this part somewhat. It's working for me at #10628

@westonpace
Copy link
Member

I've used this as part of #10628 which uses it to hook metadata_collector into the file visitor. If we want to merge this separately maybe reduce the scope to be just BindFunction?

@bkietz bkietz changed the title Sketch of a general purpose cython trampolining utility ARROW-13226: [Python] Add a general purpose cython trampolining utility Jun 30, 2021
@github-actions
Copy link

@bkietz
Copy link
Member Author

bkietz commented Jun 30, 2021

@westonpace alright I've opened a JIRA just for BindFunction and I'll strip the dataset:: specifics

@bkietz bkietz force-pushed the BindFunction-cython-utility branch from c587765 to 349858d Compare July 1, 2021 01:00
@bkietz bkietz marked this pull request as ready for review July 1, 2021 01:00
@bkietz
Copy link
Member Author

bkietz commented Jul 1, 2021

+1, merging

@bkietz bkietz closed this in db79f37 Jul 1, 2021
@bkietz bkietz deleted the BindFunction-cython-utility branch July 1, 2021 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants