Skip to content

Conversation

@cmriboldi
Copy link

LockIsolated is a helper that will help avoid threading related crashes by ensuring the value is only referenced or edited by a single source at a time. There where two main crashes that were resulting from threading issues in the WeakBox and SubscriptionSession implementations. This light weight fix should avoid those threading issues in the future.

…a LockIsolated helper that will avoid threading related crashes.

/// A generic wrapper for isolating a mutable value with a lock.
@dynamicMemberLookup
public final class LockIsolated<Value>: @unchecked Sendable {
Copy link
Contributor

Choose a reason for hiding this comment

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

@cmriboldi is there a particular reason why this class is public?

Copy link
Author

Choose a reason for hiding this comment

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

No it doesn't need to be public.

@pubnub-release-bot
Copy link

@cmriboldi this issue is addressed in 7.3.3

@github-actions github-actions bot added the status: done This issue is considered resolved. label Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: done This issue is considered resolved.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants