Skip to content

Poco EventImpl for Win32 breaks INFINITE wait #3737

@Coder666

Description

@Coder666

Describe the bug

EventImpl::waitImpl(long) adds one to the timeout value. If you specify "INFINITE" which is DWORD(-1)/0xFFFFFFFF then this waits for 0 which is completly unexpected behaviour

To Reproduce

Create an event object on Windows and wait for INFINITE

Expected behavior

When -1 is specifed the wait should blocks until signalled or error, or at the very least it should wait for 0xFFFFFFFF milliseconds!

Proposed Fixes

  • Add a constant to Event for infinite
  • Add an assert on Win32 that checks if "INFINITE" has been used
  • Stop adding 1 to the value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions