Ignore:
Timestamp:
12/15/22 15:56:11 (17 months ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Event object creation is moved into a factory.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/hu/varadiistvan/scpl/io/_win32/Event.h

    r6 r28  
    133133inline Event::Event(EventFailable& eventFailable) :
    134134    eventFailable(eventFailable),
    135     handle(CreateEvent(0, true, false, 0)),
     135    handle(eventFailable.createEvent()),
    136136    waiter(0)
    137137{
     
    144144{
    145145    removeFromWaiter();
    146     CloseHandle(handle);
     146    eventFailable.destroyEvent(handle);
    147147}
    148148
     
    172172inline void Event::fire()
    173173{
    174     if (!SetEvent(handle)) {
     174    if (!eventFailable.setEvent(handle)) {
    175175        eventFailable.setErrorCode(GetLastError());
    176176    }
     
    181181inline bool Event::clear()
    182182{
    183     if (!ResetEvent(handle)) {
     183    if (!eventFailable.resetEvent(handle)) {
    184184        eventFailable.setErrorCode(GetLastError());
    185185        return false;
Note: See TracChangeset for help on using the changeset viewer.