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

Update plugin updater to use blocks and better background thread management #2671

Merged
merged 1 commit into from
Mar 20, 2022

Conversation

pjrobertson
Copy link
Member

  • Fixes a crash where some NSView updates were done on the background thread
  • Removes a lot of the NSNotification calling
  • Reduces/removes some obsolete code

The code changes look pretty big and scary, but ultimately all I did was:

Switched to using the new async NSURLSession instead of the synchronous NSURLConnection to make HTTP requests. This in turn meant that I had to pass completionHandler blocks around to know what to do once the request had completed.

The plugin code is really messy/complicated. I tried to tidy it up and remove calls to delegates etc. - blocks are much cleaner

…gement

* Fixes a crash where some NSView updates were done on the background thread
* Removes a lot of the NSNotification calling
* Reduces/removes some obsolete code
@pjrobertson pjrobertson added this to the 2.1.0 milestone Mar 12, 2022
@pjrobertson
Copy link
Member Author

Fixes #2668

@skurfer
Copy link
Member

skurfer commented Mar 12, 2022

Should this be in 2.0.0 since it causes crashes pretty consistently?

@pjrobertson
Copy link
Member Author

Yes and no. I'd say it's fairly high priority, but I don't want it to delay 2.0.0. I'm almost thinking 2.1.0 would come out a few just a few weeks after 2.0.0. We'll put 2.0 out there, wait for some feedback for 1-2 weeks, make any changes then release 2.1.0

@skurfer skurfer modified the milestones: 2.1.0, 2.0.0 Mar 16, 2022
@skurfer
Copy link
Member

skurfer commented Mar 20, 2022

lgtm, and I used a test build that included these changes to grab my updated Clipboard plug-in.

@skurfer skurfer merged commit c82afd0 into master Mar 20, 2022
@skurfer skurfer deleted the updaterRewrite branch March 20, 2022 14:43
skurfer added a commit that referenced this pull request Mar 20, 2022
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.

None yet

2 participants