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 » Developing U++ » U++ Developers corner » Ide MT
Re: Ide MT [message #31243 is a reply to message #31239] Wed, 16 February 2011 14:08 Go to previous messageGo to previous message
raxvan is currently offline  raxvan
Messages: 60
Registered: December 2009
Member
mirek wrote on Wed, 16 February 2011 12:50

raxvan wrote on Wed, 16 February 2011 06:30

mirek wrote on Wed, 16 February 2011 11:11


Problem is, with MT and CoWork, there is absolutely no guarantee that it will run in separate thread...

If you really feel like you absolutely need to run something in separate thread, then create Thread and start it Smile



Ow , i had no idea about that. Perhaps CoWork should always run tasks in a separate thread. Initially i was going to use a Thread but i found out that CoWork was much easier to use.



The idea there is CoWork is 'optimized optimization' to fully exploit all cores.

E.g. it only starts limited number of worker threads per application and those never finish (until app exit). Then assigns pieces of work to them as needed.

If you would use CoWork just to run a thread in parallel on more places in the app, it can easilly happen that there will be no threads available.

Mirek

A thread pool fits perfectly for a variety of use cases. I don't think there will be a problem using a CoWork in a lot of places, as long as the size limitation of the queue is removed. I can see from the implementation the limit is caped to 128 and after that the job will run on the requesting thread.

I used CoWork in the idea that in the future this will be used in some other places two, avoiding thread spamming.

Raxvan.



92b48bf94855483bb4cec8bcc8c0c933
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: BackgroundTask
Next Topic: Linux anti-aliasing fonts problem
Goto Forum:
  


Current Time: Sun Jul 20 14:33:22 CEST 2025

Total time taken to generate the page: 0.11167 seconds