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 » U++ Library support » U++ MT-multithreading and servers » CoWork buggy!?
Re: CoWork buggy!? [message #14973 is a reply to message #14970] Sun, 23 March 2008 17:56 Go to previous messageGo to previous message
Werner is currently offline  Werner
Messages: 234
Registered: May 2006
Location: Cologne / Germany
Experienced Member
luzr wrote on Sun, 23 March 2008 14:11

Finish waits until all the work required by calling "Do" is finished.

...

... "CoWork::waitforfinish" ... is used for synchronization. If there are any unfinished jobs, Finish has to wait until they are finished.

...

... todo ... is not waiting job, it is *unfinished* job! (Includes waiting jobs and jobs that are currently being processed).


Thank you very much. This clarification was extremely helpful Very Happy . Indeed I misunderstood CoWorks's design Sad .

Do I get it right now when I assume that usage of this module just requires to

1.
create a CoWork instance, e. g.:
CoWork coWork;

2a.
assign a job, e. g.:
coWork.Do(a_job_in_form_of_a_callback);

or

2b.
assign a couple of jobs, e. g.:
coWork & job_0 & job_1 & job_2;

and *basically nothing more*? And that CoWork::Finish is *only* needed for synchronization purposes?

(I dumped all the other questions as "insignificant" Cool ).

Werner
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IsFinished() for CoWork
Next Topic: MT on Linux?
Goto Forum:
  


Current Time: Mon May 13 17:06:23 CEST 2024

Total time taken to generate the page: 0.02171 seconds