/* -----------------------------------------------------------------------------
	GSFramework
	Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
----------------------------------------------------------------------------- */


#ifndef __NTHREAD_EVENT__
#define __NTHREAD_EVENT__


		#include "time/ntime.h"


namespace GS {
	namespace Threading {

/*!
	@short	Multi-threaded event.
	@author	Emmanuel Julien (ejulien@nworks.fr)
*/
struct	Event
{
		void		*event;

		/// Thread entering this function will suspend until this event is triggered.
		void		Wait(Time * = 0);
		/// Trigger event.
		void		Trigger();

		Event();
		~Event();
};

	} // Threading
} // GS


#endif	// __NTHREAD_EVENT__