This repository was archived by the owner on Jul 14, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
virtualview/src/main/java/com/tmall/wireless/vaf/virtualview Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -464,23 +464,23 @@ private TmplWorker() {
464464 isRunning = false ;
465465 }
466466
467- public void setViewFactory (ViewFactory viewFactory ) {
467+ public synchronized void setViewFactory (ViewFactory viewFactory ) {
468468 mViewFactory = new WeakReference <>(viewFactory );
469469 }
470470
471- public boolean isRunning () {
471+ public synchronized boolean isRunning () {
472472 return isRunning ;
473473 }
474474
475- public void offerTask (TmplTask task ) {
475+ public synchronized void offerTask (TmplTask task ) {
476476 try {
477477 mLoadingPool .put (task );
478478 } catch (InterruptedException e ) {
479479 e .printStackTrace ();
480480 }
481481 }
482482
483- public void executeTask (String type ) {
483+ public synchronized void executeTask (String type ) {
484484 if (TextUtils .isEmpty (type )) {
485485 return ;
486486 }
@@ -505,7 +505,7 @@ public synchronized void start() {
505505 isRunning = true ;
506506 }
507507
508- public void stopSelf () {
508+ public synchronized void stopSelf () {
509509 isRunning = false ;
510510 interrupt ();
511511 }
You can’t perform that action at this time.
0 commit comments