| Author |
Threaded or not
|
naveen yadav
Ranch Hand
Joined: Oct 23, 2011
Posts: 328
|
|
Hi ,
i am developing a browser application using swing api. should this applocation be single threaded or multithreaded ?
what kind of thread concerns are there in a brower applcation ??
|
 |
Stephan van Hulst
Bartender
Joined: Sep 20, 2010
Posts: 2771
|
|
Well, when you load a page, you can break it up in several tasks. You can have a worker that constructs the page, a worker that downloads images, etc. It depends on whether you want elements to load concurrently. For a simple browser however, I suggest you start by loading and constructing the entire page with just one thread.
For user interaction though, you would need more threads. Of course there's the event dispatch thread, which should start up a worker thread when you click a link.
Note that a browser is a pretty ambitious project. You have to parse HTML, CSS, and possibly other languages, unless you use third party libraries.
|
 |
naveen yadav
Ranch Hand
Joined: Oct 23, 2011
Posts: 328
|
|
thanks Stephan.
|
 |
 |
|
|
subject: Threaded or not
|
|
|