comparison org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/Semaphore.d @ 77:af948d4bbf8c

Impls for core.jobs
author Frank Benoit <benoit@tionex.de>
date Mon, 13 Apr 2009 13:58:00 +0200
parents 52184e4b815c
children
comparison
equal deleted inserted replaced
76:f05e6e8b2f2d 77:af948d4bbf8c
35 * Attempts to acquire this semaphore. Returns true if it was successfully acquired, 35 * Attempts to acquire this semaphore. Returns true if it was successfully acquired,
36 * and false otherwise. 36 * and false otherwise.
37 */ 37 */
38 public bool acquire(long delay) { 38 public bool acquire(long delay) {
39 synchronized(mutex){ 39 synchronized(mutex){
40 implMissing( __FILE__, __LINE__ ); 40 if (Thread.interrupted())
41 // SWT 41 throw new InterruptedException();
42 // if (Thread.interrupted())
43 // throw new InterruptedException();
44 long start = System.currentTimeMillis(); 42 long start = System.currentTimeMillis();
45 long timeLeft = delay; 43 long timeLeft = delay;
46 while (true) { 44 while (true) {
47 if (notifications > 0) { 45 if (notifications > 0) {
48 notifications--; 46 notifications--;