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 » Simple Thread (simple thread example.)
Re: Simple Thread [message #55042 is a reply to message #55040] Tue, 06 October 2020 09:33 Go to previous message
mirek is currently offline  mirek
Messages: 14267
Registered: November 2005
Ultimate Member
lovmy wrote on Tue, 06 October 2020 08:15
Hello !

Thank you for your help, i need to learn more on lambda expression...

Just a question, what's the différence between thread and CoWork ?

Have a nice day !


CoWork is basically an interface to thread pool. That is a pool of waiting threads that get used on demand - this saves you the costs of creating and exiting threads.

CoWork allows you to schedule any number of jobs to be processed, possibly in parallel and then wait for all of them to be done.

That said, for most of work, CoWork is now superseded by CoDo, which basically starts the same job, usually represented by lambda, on as many CPU cores as possible.

Long story short:

If you are after improving performance by parallelizing work, check CoDo first (most iterations are best done in CoDo).

If CoDo is not suitable, check CoWork (e.g. quick-sort cannot be implemented with CoDo nicely, but can be implemented with CoWork).

For some background tasks, consider Async.

If you are after something else entirely, like long running background tasks (e.g. a thread that backups data in your application periodically), use raw Thread.

Eh, that was not so short after all Smile

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to load your GridCtrl in background thread
Next Topic: Translation files
Goto Forum:
  


Current Time: Sun Aug 24 08:19:09 CEST 2025

Total time taken to generate the page: 0.05343 seconds