Permalink
Browse files

Fix #213 reset timeout whenever destination buffer is satisfied

  • Loading branch information...
jamesrdf committed Feb 10, 2015
1 parent 8452974 commit fda613d5ca3b4941fc269bb0ceb3229a5e1e128c
View
@@ -85,7 +85,7 @@ available in 1.4.0.
});</script>
```
* Replace `<iframe class="flex"/>` with `calli.fillElement('iframe')`
* Replace `<asibe class="optional"/>` with `$('aside').filter(calli.isEmptyResource).remove();`
* Replace `<aside class="optional"/>` with `$('aside').filter(calli.isEmptyResource).remove();`
* Remove class attributes from `<time/>` and use [calli.parseDateTime](http://callimachusproject.org/docs/1.4/callimachus-reference.docbook?view#parseDateTime) to format
* calliSubmit, calliRedirect and other calli* events should be replaced with [a function call](http://callimachusproject.org/docs/1.4/callimachus-reference.docbook?view#JavaScript_Reference)
* When [creating RDF resources using the Callimachus REST API](http://callimachusproject.org/docs/1.4/callimachus-reference.docbook?view#RDF_Create), use text/turtle instead of sparql-update
@@ -1,5 +1,5 @@
Package: callimachus
Version: 1.4.1
Version: 1.4.2-alpha
Homepage: http://callimachusproject.org/
Section: database
Priority: optional
@@ -124,8 +124,10 @@ public void run() {
synchronized (AntiDeadlockThreadPool.this) {
Runnable peek = queue.peek();
if (peek == null || corePoolSize >= maximumPoolSize) {
schedule.cancel(false);
schedule = null;
if (schedule != null) {
schedule.cancel(false);
schedule = null;
}
} else if (previous == peek) {
setCorePoolSize(++corePoolSize);
} else {
@@ -160,17 +160,16 @@ public void close() throws IOException {
public int read(final ByteBuffer dst) throws IOException {
synchronized (AsyncPipe.this) {
if (!buf.hasRemaining()) {
resetTimeout();
}
int n = 0;
while (n == 0) {
while (n == 0 && dst.hasRemaining()) {
n = source(new Source() {
public int write(ByteBuffer src) throws IOException {
return copy(src, dst);
}
});
if (n == 0) {
if (!dst.hasRemaining()) {
resetTimeout();
} else if (n == 0) {
try {
long timeout = expiresAt - System.currentTimeMillis();
if (timeout <= 0) {

0 comments on commit fda613d

Please sign in to comment.