Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'master' of github.com:fusesource/hawtdispatch
  • Loading branch information
chirino committed Feb 13, 2012
2 parents cba3c89 + a14ae61 commit 649d28f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Expand Up @@ -388,6 +388,10 @@ public DispatchQueue getDispatchQueue() {

public void setDispatchQueue(DispatchQueue queue) {
this.dispatchQueue = queue;
if(readSource!=null) readSource.setTargetQueue(queue);
if(writeSource!=null) writeSource.setTargetQueue(queue);
if(drainOutboundSource!=null) drainOutboundSource.setTargetQueue(queue);
if(yieldSource!=null) yieldSource.setTargetQueue(queue);
}

public void _start(Runnable onCompleted) {
Expand Down
Expand Up @@ -29,6 +29,7 @@ abstract public class AbstractDispatchObject extends BaseSuspendable implements
protected volatile HawtDispatchQueue targetQueue;

public void setTargetQueue(DispatchQueue next) {
assert next!=this : "You cannot not set the target queue to this";

if( next!=targetQueue ) {
// Don't see why someone would concurrently try to set the target..
Expand Down

0 comments on commit 649d28f

Please sign in to comment.