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 InfluxDBClient.Point to be Sendable #69

Open
CraigSiemens opened this issue Nov 9, 2024 · 1 comment
Open

Update InfluxDBClient.Point to be Sendable #69

CraigSiemens opened this issue Nov 9, 2024 · 1 comment

Comments

@CraigSiemens
Copy link

Proposal:
Update InfluxDBClient.Point to conform to the Sendable protocol.

In theory it should be a simple change, though it's possible there's other concurrency warning that would be surfaced by adding the change.

It'd be really nice if InfluxDBClient.Point was a struct. That'd simplify adding the sendable conformance since an instance of a struct can't be referenced for multiple threads, removing the need for adding synchronization/locking which a class would require.

Current behavior:
When using the library with Swift 6, the following error is produced when passing a point across concurrent contexts.

Screenshot 2024-11-09 at 4 08 02 PM

Desired behavior:
An error shouldn't be produced.

Use case:
Using the package with Swift 6.

@bednar
Copy link
Contributor

bednar commented Nov 13, 2024

Hi @CraigSiemens,

thanks for your suggestion.

Is this something you would be willing to help with? All PR is welcome and we will be happy to review your submission.

Best Regards

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

No branches or pull requests

2 participants