adibaewa / musikcube

Automatically exported from code.google.com/p/musikcube
Other
0 stars 0 forks source link

make win32cpp::ApplicationThread class to wrap calls between threads #30

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This class should basically be a wrapper for sigslot and windows
PostMessage to be able to send signals to the GUI thread. 

Original issue reported on code.google.com by onne...@gmail.com on 14 Apr 2008 at 10:47

GoogleCodeExporter commented 9 years ago
Maybe even some simple interface like
MainThread::Call(&myobject,arg1,arg2)

Or some basic interface to forward signals to the main thread
MainThread::SignalConnect(theSignal,&myobject,&MyObject::OnTheSignal);

Need to be careful with the arguments though. They need to be threadsafe.

Original comment by onne...@gmail.com on 18 Apr 2008 at 1:27

GoogleCodeExporter commented 9 years ago

Original comment by onne...@gmail.com on 18 Apr 2008 at 8:06

GoogleCodeExporter commented 9 years ago

Original comment by onne...@gmail.com on 21 Apr 2008 at 8:08

GoogleCodeExporter commented 9 years ago

Original comment by onne...@gmail.com on 21 Apr 2008 at 8:08

GoogleCodeExporter commented 9 years ago
Decided to call it win32cpp::ApplicationThread instead.
Can be called like this:

win32cpp::ApplicationThread::Call0(this,&MyClass::MethodToCall);
win32cpp::ApplicationThread::Call1(this,&MyClass::MethodToCall,myFirstArgument);

etc...

Original comment by onne...@gmail.com on 23 Apr 2008 at 10:39

GoogleCodeExporter commented 9 years ago
Call0 and 1 are implemented. More work will probably be needed later on. But 
I'll
close it for now.

Original comment by onne...@gmail.com on 27 Apr 2008 at 9:46