mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-09-23 06:53:43 +00:00
24 lines
457 B
C++
24 lines
457 B
C++
#pragma once
|
|
|
|
#include "IGpFiber.h"
|
|
|
|
struct IGpThreadEvent;
|
|
|
|
class GpFiber_Thread final : public IGpFiber
|
|
{
|
|
public:
|
|
explicit GpFiber_Thread(void *thread, IGpThreadEvent *threadEvent);
|
|
~GpFiber_Thread();
|
|
|
|
void YieldTo(IGpFiber *fromFiber) override;
|
|
void YieldToTerminal(IGpFiber *fromFiber) override;
|
|
void Destroy() override;
|
|
|
|
private:
|
|
static int InternalThreadFunction(void *data);
|
|
|
|
bool m_isDestroying;
|
|
IGpThreadEvent *m_event;
|
|
void *m_thread;
|
|
};
|