Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-dev] core.resources Concurrency Model

Hi Mickael,
b) has some magic synchronization which i dont see

It could be a bit of all ;)

I found some magic synchronization. Actually parallel write is avoided in

org.eclipse.core.internal.resources.File.create(InputStream, int, IProgressMonitor){
    workspace.prepareOperation  // global(!) lock
    ... (actual write) ...
    workspace.endOperation(rule, true); // global unlock

Daemon Thread [ForkJoinPool-1-worker-3] (Suspended)   
    waiting for: Semaphore  (id=374)   
    Object.wait(long) line: not available [native method]   
    Semaphore.acquire(long) line: 44   
    OrderedLock.doAcquire(Semaphore, long) line: 173
    OrderedLock.acquire(long) line: 109   
    OrderedLock.acquire() line: 85   
    WorkManager.checkIn(ISchedulingRule, IProgressMonitor) line: 125       <------------- a global lock
    Workspace.prepareOperation(ISchedulingRule, IProgressMonitor) line: 2263   
    File.create(InputStream, int, IProgressMonitor) line: 106   
    ConcurrentModificationTest.writeClassFileContents(IFile, String) line: 97   

Thats probably a (or the?) reason you see only little speedup during parallel builds.

Can you please elaborate about a concrete case you think can be faulty with current code? Ideally in a test case you could submit through Gerrit?



Back to the top