Skip to content

isLocked() will release the lock if locked by itself #1

@Erikvv

Description

@Erikvv

llbe:
Looks like isLocked() will release the lock if locked. LOCK_EX → LOCK_SH → LOCK_UN.

Huliek:
You are right, though it is not common to check a lock which you locked in your own process.

I would have to add a boolean property "lockedBySelf" if I wanted to fix this, I suppose?

llbe:
Yes, a property should replace the need of LOCK_SH.

The issue I see is that it is not expected that isLocked() changes anything.

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