Skip to content

GIL release for perspective-python Async mode#1198

Merged
texodus merged 2 commits intomasterfrom
tornado-no-gil
Sep 21, 2020
Merged

GIL release for perspective-python Async mode#1198
texodus merged 2 commits intomasterfrom
tornado-no-gil

Conversation

@texodus
Copy link
Member

@texodus texodus commented Sep 18, 2020

Adds set_loop_callback() public method to the PerspectiveManager class, which takes as an argument a loop-queueing function, such as asyncio call_soon() and Tornado add_callback(). Once invoked, Perspective will presume to be owned by the calling thread, and will release the Python GIL for the bulk of reading/writing Apache Arrow data, as well as calculating
new View contexts. There are some new restrictions in this mode, namely that Perspective is no longer thread safe, covered in the documentation.

Copy link
Contributor

@sc1f sc1f left a comment

Choose a reason for hiding this comment

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

Looks good! Tested locally & offline and enables some really great parallel performance over large datasets.

@texodus texodus merged commit e21b5a1 into master Sep 21, 2020
@texodus texodus deleted the tornado-no-gil branch September 21, 2020 03:13
@texodus texodus added enhancement Feature requests or improvements Python labels Sep 21, 2020
@texodus texodus mentioned this pull request Oct 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Feature requests or improvements Python

Development

Successfully merging this pull request may close these issues.

2 participants