Permalink
Browse files

Merge branch 'master' of github.com:fusesource/hawtdispatch

  • Loading branch information...
chirino committed Feb 13, 2012
2 parents cba3c89 + a14ae61 commit 649d28f8c5371f6d136d327813caf03df81e4186
@@ -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) {
@@ -29,6 +29,7 @@
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..

0 comments on commit 649d28f

Please sign in to comment.