[WIP] Implement WaitFor and WaitForMultiple for THandleObject
Original Reporter info from Mantis: Bi0T1N @Bi0T1N
-
Reporter name: Bi0T1N
Original Reporter info from Mantis: Bi0T1N @Bi0T1N
- Reporter name: Bi0T1N
Description:
This THandleObject (http://docwiki.embarcadero.com/Libraries/Rio/en/System.SyncObjs.THandleObject) patch is work-in-progress but there are some problems:
- COM is Windows specific so I enabled it on Windows only but I don't get why there is the UseCOMWait variable/parameter? For what is it needed? The API (https://docs.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-waitformultipleobjects) doesn't provide anything related to COM.
- TEventObject.WaitFor already had the needed code thus I moved it to THandleObject.WaitFor but the FPC documentation of BasicEventWaitFor (https://www.freepascal.org/docs-html/rtl/system/basiceventwaitfor.html) says it's obsolete but the new RTLEventWaitFor doesn't return the the result of the API function. However, BasicEventWaitFor is still used in some parts of FPC.
- Haven't created any tests yet. It's just a reference implementation of the documentation.
Additional information:
The patch provided for https://bugs.freepascal.org/view.php?id=37495 needs to be applied first.
Mantis conversion info:
- Mantis ID: 37524
- Version: 3.3.1