what are the types of threading models in VB.net ?

Answer Posted / praveena

There are lot of threading model available, but we focus on
threadingmodels that are common to win32based environments

singleThreaded:There is only one thread with in the
process,and it is doing all the work for the process.The
process must wait for the current execution of the thread
to complete before it can perform another action.

Apartment Threading (Single Threaded Apartment)
Apartment threaded means there are multiple threads within
the application. In single threaded apartment (STA) each
thread is isolated in a separate apartment underneath the
process. The process can have any number of apartments that
share data through a proxy. The application defines when
and for how long the thread in each apartment should
execute. All requests are serialized through the Windows
message queue such that only a single apartment is accessed
at a time and thus only a single thread will be executing
at any one time
Free Threading (Multi Threaded Apartment)
Free threaded applications were limited to programming
languages such as C++ until the release of Microsoft .NET.
The free threaded/Multi Threaded Apartment (MTA) model has
a single apartment created underneath the process rather
than multiple apartments. This single apartment holds
multiple threads rather than just a single thread. No
message queue is required because all of the threads are a
part of the same apartment and can share data without a
proxy.

The developer must provide thread synchronization as part
of the code to ensure that threads do not simultaneously
access the same resources

Is This Answer Correct ?    12 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Thank you for replying to my Question regarding Barcodes in VB.net. My next question is that how to use Barcode Fonts in VB.net I need a small code to Generate Barcodes in VB.net from a string of Values. This is the only problem i am left with in my project. Any body can help me please.

2047


Which class allows an element to be accessed using unique key?

523


Name some of the keywords used in vb.net?

606


Define naming convention?

632


What is the difference between readonly variable and constant variable?

565






What is the top .net class that everything is derived from?

618


What are jagged arrarys ?

576


Explain about the ruby interface generator?

552


What is the use of internal keyword?

577


What is the difference between manifest and metadata?

552


What is the size of .net object?

588


Sir, what code to store data from vb net sql server 2008 to 2005 and at the same time in order to validate the data entered is not the same, but there have been contacts in the module. Examples such as the log table that I created, the user name as the primary key.

1755


How many ways the function can return values?

537


Explain about the performance of visual basic?

593


Describe about visual basic.net?

563