Skip to content

Mutex comment for init/deinit #447

Description

@SamWindell

I might be misunderstanding something, but it seems there's a contradiction in the comments of entry.h regarding the need for a mutex in init/deinit calls.

With regards to how to handle init/deinit (near the top of the file):
the functions must be defensive, mutex locking and counting calls if undertaking non trivial non idempotent actions.
and
The most obvious implementation will maintain a static counter and a global mutex, increment the counter on each init, decrement it on each deinit, and only undertake the init or deinit action when the counter is zero.

But then the comments for init and deinit both say this: it is forbidden to call this function simultaneously from multiple threads. It is also forbidden to call it simultaneously with *any* other CLAP-related symbols from the DSO, including (but not limited to) deinit()

Can we clear up any ambiguity here?

I would suggest just removing these: mutex locking and and and a global mutex

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