GOG GALAXY SDK Documentation
GalaxyThread.h
1 #ifndef GALAXY_THREAD_H
2 #define GALAXY_THREAD_H
3 
4 namespace galaxy
5 {
6  namespace api
7  {
8 
17  typedef void* ThreadEntryParam;
18 
23 
28  {
29  public:
30 
36  virtual void Join() = 0;
37 
43  virtual bool Joinable() = 0;
44 
50  virtual void Detach() = 0;
51 
52  virtual ~IGalaxyThread() {};
53  };
54 
59  {
60  public:
61 
73  virtual IGalaxyThread* SpawnThread(ThreadEntryFunction const entryPoint, ThreadEntryParam param) = 0;
74 
75  virtual ~IGalaxyThreadFactory() {};
76  };
77 
79  }
80 }
81 
82 #endif
Custom thread spawner for the Galaxy SDK.
Definition: GalaxyThread.h:59
virtual IGalaxyThread * SpawnThread(ThreadEntryFunction const entryPoint, ThreadEntryParam param)=0
Spawn new internal Galaxy SDK thread.
The interface representing a thread object.
Definition: GalaxyThread.h:28
virtual void Detach()=0
Detach the thread.
virtual bool Joinable()=0
Checks if the IGalaxyThread is ready to Join().
virtual void Join()=0
Join the thread.
void(* ThreadEntryFunction)(ThreadEntryParam)
The entry point function which shall be started in a new thread.
Definition: GalaxyThread.h:22
void * ThreadEntryParam
The parameter for the thread entry point.
Definition: GalaxyThread.h:17