[jbosstools-issues] [JBoss JIRA] Issue Comment Edited: (JBIDE-7317) Cloud Connection wizard: user input is blocked when entering a url

Andre Dietisheim (JIRA) jira-events at lists.jboss.org
Tue Nov 9 10:54:02 EST 2010


    [ https://jira.jboss.org/browse/JBIDE-7317?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12556685#action_12556685 ] 

Andre Dietisheim edited comment on JBIDE-7317 at 11/9/10 10:53 AM:
-------------------------------------------------------------------

analyzed the databinding code. Here's my current state of knowledge for documentation purposes:

To my understanding updates are executed in their own thread:

I observer the url text field in delayed manner (Observable#observeDelayed(delay)).
Delayed observables trigger the update when the delay that was indicated is reached. A Updater (runnable) that is triggered by a timer is used for that purpose:

- DelayedObservableValue#makeDirty:

    scheduleUpdate()

- DelayedObservableValue#scheduleUpdate:

    updater = new ValueUpdater(cachedValue);
    getRealm().timerExec(delay, updater);

- Realm#timerExec: 

    timer.schedule(
        new TimerTask() {
            public void run() {
                asyncExec(runnable);
            }
        }, milliseconds);

- Realm#asyncExec:

    ensureWorkerThreadIsRunning();
    workQueue.enqueue(runnable);
    workQueue.notifyAll();

- Realm#ensureWorkerThreadIsRunning:

    if (workerThread == null) {
        workerThread = new Thread() {
            public void run() {
                try {
                    while (true) {
                        Runnable work = null;
                        synchronized (workQueue) {
                            while (workQueue.isEmpty()) {
                                workQueue.wait();
                            }
                            work = (Runnable) workQueue.dequeue();
                        }
                        syncExec(work);
                    }
                } catch (InterruptedException e) {
                    // exit
                }
            }
        };
        workerThread.start();
    }


      was (Author: adietish):
    analyzed the databinding code. Here's my current state of knowledge for documentation purposes:

To my understanding updates are executed in their own thread:

I observer the url text field in delayed manner (Observable#observeDelayed(delay)).
Delayed observables trigger the update when the delay that was indicated is reached. A Updater (runnable) that is triggered by a timer is used for that purpose:

- DelayedObservableValue#makeDirty:

	scheduleUpdate()

- DelayedObservableValue#scheduleUpdate:

	updater = new ValueUpdater(cachedValue);
	getRealm().timerExec(delay, updater);

- Realm#timerExec: 

	timer.schedule(
		new TimerTask() {
			public void run() {
				asyncExec(runnable);
			}
	}, milliseconds);

- Realm#asyncExec:

	ensureWorkerThreadIsRunning();
	workQueue.enqueue(runnable);
	workQueue.notifyAll();

- Realm#ensureWorkerThreadIsRunning:

		if (workerThread == null) {
			workerThread = new Thread() {
				public void run() {
					try {
						while (true) {
							Runnable work = null;
							synchronized (workQueue) {
								while (workQueue.isEmpty()) {
									workQueue.wait();
								}
								work = (Runnable) workQueue.dequeue();
							}
							syncExec(work);
						}
					} catch (InterruptedException e) {
						// exit
					}
				}
			};
			workerThread.start();
		}
	}

  
> Cloud Connection wizard: user input is blocked when entering a url
> ------------------------------------------------------------------
>
>                 Key: JBIDE-7317
>                 URL: https://jira.jboss.org/browse/JBIDE-7317
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: deltacloud
>    Affects Versions: 3.2.0.Beta1
>            Reporter: Andre Dietisheim
>            Assignee: Andre Dietisheim
>             Fix For: 3.2.0.Beta2
>
>
> If you try to create a new connection (Cloud Connection Wizard) and enter a URL, you may come to a point where you cannot enter any new character. The UI is freezing.
> The reason for this is that the wizard tries to connect to the given url and tries to determine if a deltacloud instance may be reached there. This process blocks the UI. The databinding that is used for this matter does checking in a background thread, but does not do it in a proper way (#observeDelayed).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list