Skip to content

which functions are goroutine safe? #339

Description

@it-bsi

Hi,

from the package documentation the only function which is said to be safe for concurrent use is Sender.Send (i searched for "goroutine", "safe", "thread", "concurrent", ...): https://pkg.go.dev/github.com/Azure/go-amqp#Sender.Send

I looked around a bit in the code starting from the function Receiver.AcceptMessage and this function for example seem to be goroutine safe since all changes to the Receiver struct are done with either a mutex or an atomic operation (correct me if I'm wrong).

I would like to call Receiver.AcceptMessage from multiple goroutines each having their own Message struct (they share only the Receiver struct), is it possible without a mutex?

It is possibile to update the package documentation stating which functions are goroutine safe?

Thanks

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions