summaryrefslogtreecommitdiff
path: root/sandbox
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2003-03-26 16:32:47 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2003-03-26 16:32:47 +0000
commite84d5a7ebe34630ea79faeae1ec1f3ed4cb6ef32 (patch)
tree1dd3a6cca1c1e9e06162776d18e9e0b21fd8135e /sandbox
parentbcb75a10013029571ac9c876e54343da0fc77530 (diff)
MWS_SRX644: migrate branch mws_srx644 -> HEAD
Diffstat (limited to 'sandbox')
-rw-r--r--sandbox/com/sun/star/lib/sandbox/ExecutionContext.java38
-rw-r--r--sandbox/prj/d.lst2
-rw-r--r--sandbox/util/delzip0
-rw-r--r--sandbox/util/makefile.mk12
4 files changed, 30 insertions, 22 deletions
diff --git a/sandbox/com/sun/star/lib/sandbox/ExecutionContext.java b/sandbox/com/sun/star/lib/sandbox/ExecutionContext.java
index 633c16a9c34b..bb597855fed7 100644
--- a/sandbox/com/sun/star/lib/sandbox/ExecutionContext.java
+++ b/sandbox/com/sun/star/lib/sandbox/ExecutionContext.java
@@ -2,9 +2,9 @@
*
* $RCSfile: ExecutionContext.java,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: jl $ $Date: 2002-09-24 13:31:32 $
+ * last change: $Author: hr $ $Date: 2003-03-26 17:28:12 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -161,6 +161,16 @@ public abstract class ExecutionContext extends Observable {
dispatchThread = new Thread( threadGroup, new Runnable() {
public void run() {
while( loop ) {
+ if( head != null) {
+ if (DEBUG) System.err.println("#### ExecutionContext dispatchThread " + dispatchThread.toString() + " -dispatching: " + head.id);
+ dispatch( head.id );
+ if (DEBUG) System.err.println("#### ExecutionContext dispatchThread " + dispatchThread.toString() + " get next head - current state is " +head.id );
+ synchronized( getSynObject() ) {
+ head = head.next;
+ getSynObject().notify();
+ }
+ }
+
synchronized( getSynObject() ) {
if (head == null) {
try {
@@ -172,18 +182,12 @@ public abstract class ExecutionContext extends Observable {
}
}
}
- if (DEBUG) System.err.println("#### ExecutionContext dispatchThread " + dispatchThread.toString() + " -dispatching: " + head.id);
- dispatch( head.id );
- if (DEBUG) System.err.println("#### ExecutionContext dispatchThread " + dispatchThread.toString() + " get next head - current state is " +head.id );
- synchronized( getSynObject() ) {
- head = head.next;
- getSynObject().notify();
- }
}
if(DEBUG) System.err.println("#### ExecutionContext - dispatchThread -terminating");
}
});
+ dispatchThread.setDaemon(true);
dispatchThread.start();
}
public void sendEvent(int id) {
@@ -224,22 +228,16 @@ public abstract class ExecutionContext extends Observable {
synchronized( getSynObject() ) {
while( head != null )
getSynObject().wait( timeout ); // wait at most one second for each queued command
- }
+ loop = false;
+ getSynObject().notifyAll();
+ }
+ dispatchThread.join(timeout);
}
catch(InterruptedException ee) {
if(DEBUG) System.err.println("#### ExecutionContext " + dispatchThread.toString() + " - dispose 1:" + ee);
}
- loop = false;
-
- getSynObject().notifyAll();
- // dispatchThread.interrupt();
- dispatchThread.join(timeout);
-
if(DEBUG) threadGroup.list();
-
-// threadGroup.stop();
-
if ( !threadGroup.isDestroyed() )
threadGroup.destroy();
}
@@ -355,8 +353,8 @@ public abstract class ExecutionContext extends Observable {
if (status == LOADED || status == DESTROYED) {
xdispose();
// baseResourceLoader.flush();
- setStatus(DISPOSED);
showStatus("disposed");
+ setStatus(DISPOSED);
}
else
showStatus("notdestroyed");
diff --git a/sandbox/prj/d.lst b/sandbox/prj/d.lst
index a05fe96c1bde..4630f673a939 100644
--- a/sandbox/prj/d.lst
+++ b/sandbox/prj/d.lst
@@ -1,5 +1,7 @@
..\%__SRC%\class\sandbox.jar %_DEST%\bin%_EXT%\sandbox.jar
+..\%__SRC%\bin\sandbox_src.zip %COMMON_DEST%\bin%_EXT%\sandbox_src.zip
+
..\%__SRC%\lib\lib*static*.dylib %_DEST%\lib%_EXT%\lib*static*.dylib
..\%__SRC%\misc\*staticdatamembers.cxx %_DEST%\inc%_EXT%\*staticdatamembers.cxx
..\%__SRC%\misc\*staticdatamembers.h* %_DEST%\inc%_EXT%\*staticdatamembers.h*
diff --git a/sandbox/util/delzip b/sandbox/util/delzip
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/sandbox/util/delzip
diff --git a/sandbox/util/makefile.mk b/sandbox/util/makefile.mk
index d201d0141e37..61e7b1c13c07 100644
--- a/sandbox/util/makefile.mk
+++ b/sandbox/util/makefile.mk
@@ -2,9 +2,9 @@
#
# $RCSfile: makefile.mk,v $
#
-# $Revision: 1.3 $
+# $Revision: 1.4 $
#
-# last change: $Author: jl $ $Date: 2002-10-25 06:55:27 $
+# last change: $Author: hr $ $Date: 2003-03-26 17:28:14 $
#
# The Contents of this file are made available subject to the terms of
# either of the following licenses
@@ -74,6 +74,14 @@ JARCLASSDIRS = com$/sun$/star$/lib$/sandbox
JARTARGET = sandbox.jar
JARCOMPRESS = TRUE
+# Special work necessary for building java reference with javadoc.
+# The source of puplic APIs must be delivered and used later in the
+# odk module.
+ZIP1TARGET=sandbox_src
+ZIP1FLAGS=-u -r
+ZIP1DIR=$(PRJ)
+ZIP1LIST=com -x "*makefile.mk"
+
# --- Targets ------------------------------------------------------
.INCLUDE : target.mk