Skip to content
Discussion options

You must be logged in to vote

In async mode, once you have started the Perspective thread, all operations that touch the Perspective table has to be on that thread. In this example, calling BASE_TABLE.update() from the main thread is not threadsafe and can cause issues in a non-deterministic way.

To call update safely, use MANAGER._loop_callback so that the update operation happens on the Perspective thread and not the main thread:

MANAGER._loop_callback(BASE_TABLE.update, {"index": i, "num1": i, "num2": 2 * i}])

Additionally, if you are able to get the coredumps for the segfaulting process that will help us narrow down where the issue is. I think the earlier example you raised could be fixed with calling update through

Replies: 10 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by choandrew
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #1313 on April 16, 2021 19:10.