text: /*
   * Copyright (c) 2017-2018, The Alloy Developers.
   *
   * This file is part of Alloy.
   *
   * This file is subject to the terms and conditions defined in the
   * file 'LICENSE', which is part of this source code package.
   */
  
  #include "EventLock.h"
  #include <System/Event.h>
  
  namespace System {
  
  EventLock::EventLock(Event& event) : event(event) {
    while (!event.get()) {
      event.wait();
    }
  
    event.clear();
  }
  
  EventLock::~EventLock() {
    event.set();
  }
  
  }
  