Skip to content

Conversation

siren186
Copy link
Member

void test_std()
{
    std::mutex m;
    std::unique_lock<std::mutex> guard(m);
    guard.unlock(); // OK
    guard.lock(); // OK
}

void test_poco()
{
    Poco::Mutex m;
    Poco::ScopedLockWithUnlock<Poco::Mutex> guard(m);
    guard.unlock(); // OK
    guard.lock(); // Failed !!!
}

This PR is to make Poco::ScopedLockWithUnlock can lock/unlock for many time. Just same like std::unique_lock do.

@matejk matejk added this to the Release 1.14.0 milestone Aug 29, 2024
@siren186 siren186 requested a review from matejk August 29, 2024 10:43
@matejk matejk merged commit aa8084c into pocoproject:main Aug 29, 2024
43 checks passed
@siren186 siren186 deleted the feat/ScopedLockWithUnlock branch August 30, 2024 02:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants