Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add mutex locks and unlocks to xviewer_list_store #202

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ygerlach
Copy link

@ygerlach ygerlach commented Jan 8, 2025

This fixes #201

It seems XviewerListStore had a GMutex in its private section, but it was only used in xviewer_list_store_remove_thumbnail_job and xviewer_list_store_add_thumbnail_job i added it to most other XviewerListStore methods as i seemed fit. There might be some cases i overlooked.

I am not sure how well glib handles cases like this:

gtk_tree_model_get (GTK_TREE_MODEL (store), iter, [...], -1);

[stuff ... other threads may modify store]

gtk_list_store_set (GTK_LIST_STORE (store), iter, [...], -1);

would this cause glib to crash? or are such cases get handled gracefully? If not: then there might be some race conditions left.

(example from xviewer_list_store_thumbnail_unset)

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.

Xviewer crashes loading an image while different images are being written to the same directory
1 participant