Can someone please give me a specific example in which you would use threading in an application.?
1970-01-01 00:00:00 UTC
Can someone please give me a specific example in which you would use threading in an application.?
Eight answers:
Franzi
2006-10-13 05:21:21 UTC
we can take MS-Word as a example for multithreaded application, where while u r typing some information, a thread check for spelling, a thread will change case of characters, and another thread takecare of indentation
2016-03-28 11:19:56 UTC
Christians who take the bible word for word and as the word of god, what do you have to say about this. Do you know what a covenant is? This is all in relation to the "old" covenant, which was a legally binding agreement between the two parties, God and the Israelites. Christians are not a party to this old covenant, and this old covenant came to an end. You cannot be held to the conditions of a covenant you are not a party to. .
Special Ed
2006-10-13 07:21:55 UTC
You can try a TCP/IP multi-socket winsock server that accepts multiple connections.
What it basically did : throughout the night multiple remote sites would connect to the server, exchange data, check for updates and then log off. At any one time 10 connections could be active and exchanging actions (aka running on multiple threads).
Hope that helps! It is a lot more complicated then that of course.
2006-10-13 05:56:56 UTC
Most programs that print use a thread to deal with printing - it stops the app from freezing up while it prints. Look at MS Word - load a big document and hit print. You can carry on working straight away, but in the bar at the bottom you can see a little icon to show you that the print thread is active.
Rawlyn.
poorcocoboiboi
2006-10-13 05:14:08 UTC
Asynchronous actions are at the heart of AJAX web applications. They work by starting a thread which communicates with the server, receives a response and grafts that into the web page without reloading the page.
smiley
2006-10-13 05:31:58 UTC
u can try developing an application for a clock
Colorado
2006-10-13 05:14:02 UTC
Needling.
2006-10-13 05:23:48 UTC
hi , Threading tips
The ActiveX to Enterprise Java Beans (EJB) bridge supports both free-threaded and apartment-threaded access and implements the Free Threaded Marshaler to work in a hybrid environment such as Active Server Pages (ASP). Each thread created in the ActiveX process is mirrored in the Java environment when the thread communicates through the ActiveX to EJB bridge. In addition, once all references to Java objects (there are no JObjectProxy or JClassProxy objects) are loaded in an ActiveX thread, the ActiveX to EJB bridge detaches the thread from the Java virtual machine (JVM) code. Therefore, you must be careful that any Java code that you access from a multithreaded Windows application is thread safe. Visual Basic code and VBScript applications are both essentially single threaded. Therefore, Visual Basic and VBScript applications do not have threading issues in the Java programs they access. Active Server Pages and multithreaded C and C++ programs can have issues.
Consider the following scenario:
1. A multithreaded Windows Automation Container (our ActiveX Process) starts. It exists on Thread A.
2. The ActiveX Process initializes the ActiveX to EJB bridge, which starts the JVM code. The JVM attaches to the same thread and internally calls it Thread 1.
3. The ActiveX Process starts two threads: B and C.
4. Thread B in the ActiveX Process uses the ActiveX to EJB bridge to access an object that was created in Thread A. The JVM attaches to thread B and calls it Thread 2.
5. Thread C in the ActiveX Process never talks to the JVM code, so the JVM never needs to attach to it. This is a case where the JVM code does not have a one-to-one relationship between ActiveX threads and Java threads.
6. Thread B later releases all of the JObjectProxy and JClassProxy objects that it used. The Java Thread 2 is detached.
7. Thread B again uses the ActiveX to EJB bridge to access an object that was created in Thread A. The JVM code attaches again to the thread and calls it Thread 3.
ActiveX process JVM access by ActiveX process
Thread A - Created in 1 Thread 1 - Attached in 2
Thread B - Created in 4 Thread 2 - Attached in 4, detached in 6 Thread 3 - Attached in 7
Thread C - Created in 4
Threads and Active Server Pages
Active Server Pages (ASP) in Microsoft Internet Information Server is a multithreaded environment. When you create the XJB.JClassFactory object, you can store it in the Application collection as an Application-global object. All threads within your ASP environment can now access the same ActiveX to EJB bridge object. Active Server Pages by default creates 10 Apartment Threads per ASP process per CPU. This means that when your ActiveX to EJB bridge object is initialized any of the 10 threads can call this object, not just the thread that created it.
If you need to simulate single-apartment behavior, you can create a Single-Apartment Threaded ActiveX dynamic link library (DLL) in Visual Basic code and encapsulate the ActiveX to the EJB bridge object. This encapsulation guarantees that all access to the JVM object is on the same thread. You need to use the
ⓘ
This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.