Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] CDT build system, workspace jobs, and threads

On 28 October 2011 22:45, Vladimir Prus <vladimir@xxxxxxxxxxxxxxxx> wrote:
The two jobs are executed sequentally. In fact, the second job is not even
scheduled until the first one is done. Still, the changes to project description
done by the first workspace job and not present in project description as obtained
by the second job. I noticed that jobs are run in different threads.

Can somebody guess what's going on here? [Let's leave aside the question about why there are
workspace jobs in the first place, and why I cannot get away with a single
setProjectDescription call, etc. -- I just want to understand this specific issue]

What you've described should work fine.  If the jobs run sequentially and are fully-ordered, so you're really seeing:
  Thread 1: getPD() ...  setPD()   > ... >  Thread 2: getPD ... setPD()

Thread 2 should see all the changes made by Thread1. If, instead, Thread 2 does a get before Thread 1 has done its set, then Thread 2 will have a handle on the PD as it was before Thread 1's set.


Back to the top