Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » How do blocking popups work?
How do blocking popups work? [message #98993] Sun, 20 July 2008 04:21 Go to next message
StrayAlien is currently offline StrayAlienFriend
Messages: 6
Registered: July 2009
Junior Member
Hi all,

I notice that Window.open() in RAP is blocking. I am intrigued. Given
the remote natue of the UI and the request/response paradigm (with
associated lifecycle) can anyone offer an explanation of how this works?
... or dare I ask, is it documented anywhere?

I have been code trawling but, to be honest, it seems a little opaque.

Appreciated.

Greg.
Re: How do blocking popups work? [message #99097 is a reply to message #98993] Mon, 21 July 2008 12:41 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rsternberg.innoopract.com

Hi Greg,

Greg wrote:
> I notice that Window.open() in RAP is blocking. I am intrigued. Given
> the remote natue of the UI and the request/response paradigm (with
> associated lifecycle) can anyone offer an explanation of how this
> works? .. or dare I ask, is it documented anywhere?
>
> I have been code trawling but, to be honest, it seems a little opaque.

since the implementation of Display#readAndDispatch in 1.1M2 [1],
blocking dialogs work pretty much the same as in RCP. When in blocked
state, Window#open() runs the event loop itself and returns control back
to the caller when the window is being closed.

How readAndDispatch works goes down to the very core of RAP. From the
bird's-eye view, every session has its own UI thread which runs the
event loop and sleeps between requests.

Regards, Ralf

[1] http://www.eclipse.org/rap/noteworthy/news_11M2.php
Re: How do blocking popups work? [message #99168 is a reply to message #99097] Tue, 22 July 2008 02:13 Go to previous messageGo to next message
StrayAlien is currently offline StrayAlienFriend
Messages: 6
Registered: July 2009
Junior Member
Hi Ralf,

yes, at a high level I can see that going on. Some further looking into
the code revealed the additional thread usage for each session and that
started to make thing a bit clearer. I can see it does go to the very
heart of it. I haven't quite got my head around how the lifecycle code
works and how this sudden thread sleeping during lifecycle processing
affects it all, but slowly slowly ...

Thanks for the reply.

Greg.
Re: How do blocking popups work? [message #99183 is a reply to message #99168] Tue, 22 July 2008 08:23 Go to previous messageGo to next message
Benjamin Muskalla is currently offline Benjamin MuskallaFriend
Messages: 237
Registered: July 2009
Senior Member
Hi,

the inner workings of readAndDispatch and the apartment threading of RWT
a a little complex as it needs to be multi-user aware. But we will
provide a design document soon which explains the lifecycle and the
readAndDispatch implementation in much more detail.

Greets
Benny

Greg wrote:
> Hi Ralf,
>
> yes, at a high level I can see that going on. Some further looking into
> the code revealed the additional thread usage for each session and that
> started to make thing a bit clearer. I can see it does go to the very
> heart of it. I haven't quite got my head around how the lifecycle code
> works and how this sudden thread sleeping during lifecycle processing
> affects it all, but slowly slowly ...
>
> Thanks for the reply.
>
> Greg.
>
Re: How do blocking popups work? [message #99987 is a reply to message #99183] Thu, 24 July 2008 23:08 Go to previous message
StrayAlien is currently offline StrayAlienFriend
Messages: 6
Registered: July 2009
Junior Member
Thanks Benny,

Magic. I am sure that will be welcomed by the community.

Yes, it is complex isn't it. Attempting to guess what multiple threads
are doing and how they interact just by looking at the code can be, well,
less than illuminating!

I've not managed to be able to get a debug session going at all, so
sticking with the code will do for now.

I can mostly understand how the dispatch loop does it thing, and I reckon
I'm almost there with how the threadswitch works, but not quite with what
the callback manager's role is in all this.

Anyways, thanks for the response. Appreciated.

Greg.
Previous Topic:Problem deploying .war file for tomcat
Next Topic:Startup level of fragments
Goto Forum:
  


Current Time: Wed Jan 15 11:00:04 GMT 2025

Powered by FUDForum. Page generated in 0.02777 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top