Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » Multi-Threading newbie questions
Multi-Threading newbie questions [message #37902] Wed, 21 November 2012 11:55 Go to next message
navi is currently offline  navi
Messages: 107
Registered: February 2012
Location: Sydney, Australia
Experienced Member
I have checked the Example, Bazzar and have search the Forum for a beginner’s guide/example for Multi-Threading/CoWork

I found the followings CoWork, GuiMT, GuiLock and few other MT Server examples. I am still as confused as when I started with this topic. Is there an easy example or beginner’s guide exist for how to Multi-Thread anywhere?

What I am trying to achieve is the following:
I have 2 Vectors in my MainWindow Class. I am trying to Create a WorkerFunction(Vector<String>& a, Vector<String>& b) which will copy Vector ‘a’ into Vector ‘b’ element by element and also need to notify the MainWindow about its progress i.e how many element has currently been copied. How do I create the thread? Should I use Thread() or CoWork? what would happen if while the Worker is running and the user closed the MainWindow?

Thanks & Regards
Navi

[Updated on: Wed, 21 November 2012 12:00]

Report message to a moderator

Re: Multi-Threading newbie questions [message #37903 is a reply to message #37902] Wed, 21 November 2012 22:57 Go to previous messageGo to next message
navi is currently offline  navi
Messages: 107
Registered: February 2012
Location: Sydney, Australia
Experienced Member
I think I found a reasonably easy example on the below forum topic. based on this example I have wrote my Thread and it seems to be working so far!

thread sample and overrideCursor

and answers for some very good questions

Basic MT queries

Thanks
Navi

[Updated on: Sun, 25 November 2012 04:26]

Report message to a moderator

Re: Multi-Threading newbie questions [message #38202 is a reply to message #37903] Wed, 05 December 2012 22:34 Go to previous messageGo to next message
281264 is currently offline  281264
Messages: 270
Registered: June 2010
Location: Spain
Experienced Member
navi,

Time ago I prepared this example, just to practice; it may be of help.

Javier
Re: Multi-Threading newbie questions [message #38205 is a reply to message #38202] Thu, 06 December 2012 01:06 Go to previous message
navi is currently offline  navi
Messages: 107
Registered: February 2012
Location: Sydney, Australia
Experienced Member
281264 wrote on Wed, 05 December 2012 22:34

navi,

Time ago I prepared this example, just to practice; it may be of help.

Javier


Hi Javier,
Thanks for uploading your example. I have gone through your practice thread app. Thanks it was quite simple and easy. I learned that we can directly call EnterGuiMutex();LeaveGuiMutex(); for setting up GUI lock instead of using GuiLock objects. I prefer you style as it more explicit and not based on scope like GuiLock;

regards,
Navi

Previous Topic: Icon size
Next Topic: VectorMap picks two vectors
Goto Forum:
  


Current Time: Wed Apr 24 21:23:21 CEST 2024

Total time taken to generate the page: 0.03714 seconds