Brandon
2011-07-25 18:27:45
K I somehow this weird idea came into my head about being able to use multi-threading with smart..
I mean smart is written in c++ and java so shouldn't smart be able to initialize a thread like Backgroundworker^ and then have simba send commands to smart who then gives the Backgroundworker.doWork() something to do?
So Simba Command -> Smart -> Smart's backgroundworker.dowork();
I mean smart is written in c++ and java so shouldn't smart be able to initialize a thread like Backgroundworker^ and then have simba send commands to smart who then gives the Backgroundworker.doWork() something to do?
So Simba Command -> Smart -> Smart's backgroundworker.dowork();
private: System::ComponentModel::BackgroundWorker^ Worker;
void InitializeComponent(void) //this would go in smart's source code itself.
{
this->Worker->DoWork += gcnew System::ComponentModel::DoWorkEventHandler(this, &Form1::Worker_DoWork);
}
//This would go in smart's source code itself..
private: System::Void Worker_DoWork(System::Object^ sender, System::ComponentModel::DoWorkEventArgs^ e) {
// [B]Work/comands to do here from SMART/Simba[/B]
}
Worker->RunWorkerAsync(); // Tells Smart's backgroundworker to do what it has been assigned.. could possibly implement this in simba?
Of course it's not going to be managed code though.. it would have to be Win32 API.. Don't think its cross platform either but most users use windows anyway so what do u guys think? Possible or no? Idea of making smart initialize the thread and have simba tell smart what to do with the thread..