|
by: Keith Langer |
last post by:
I would like to know why locking on a new object takes significantly
longer than locking on a strongly typed object. All of the posts I've
seen say that it is best to lock on a "new object", but it takes more
than 3x longer than locking on anything other than object. Here's a
test case:
Module Module1
Sub Main()
|
by: fred |
last post by:
If I have multiple threads running a Sub as below then a number of threads
can be held up at the SyncLock. When it becomes free which thread goes
first. Is it just by chance which thread goes first or do the threads queue
in a FIFO or perhaps a LIFO bases.
Thanks
Fred
Sub SomeWork()
|
by: Bob Day |
last post by:
Using vs 2003, vb.net sql msde..
Consider the following code snippets. See **** for questions. All are
shared and accessed by multiple threads simultaneiously.
' Instantiate per for this shared class
Private Shared gcCDsd As New Class_Component_Designer
|
by: Bob Day |
last post by:
Ok, I have done a lot of reading(of the newsgroup answers, help files and
MSDN articles) of synclock.
I understand what you are saying in the newsgroup, and it is very helpful.
It does, however, directly contradict what the VS 2003 help file says, and
it seems that various posters to my original questions on Synclock disagree
with each other. It seems, that the best practice is to use sysnlock to
protect code, not variables. That...
|
by: SD |
last post by:
I have a public object that I only want one thread to access at a time.
However the access to this object is not limited to one procedure. Will
SyncLock work in this case? If not what options do I have?
Thanks
SD
Code in Module
public A as Collection
|
|
by: fred |
last post by:
I have a VB application that is using MS Access as its database.
To avoid connection delays the application creates one connection to the
database at start-up and maintains that single connection throughout until
the application closes.
I now want to use multithreading to improve the feel of the application but
I need some help understanding Synclock. The aim here is to prevent any two
threads from trying to use the same connection at the...
|
by: Chris Dunaway |
last post by:
I was using a Queue object like this to create my own specialized queue
class for use with my own objects:
Public Class MySpecializedQueue
Private q As New Queue
Public Sub Enqueue(obj As MyCustomClass)
SyncLock q.SyncRoot
q.Enqueue(obj)
|
by: Brett |
last post by:
Say I have a DLL with a method that does a file write. I call this DLL from
an application and pass the file path and name to the FileWrite() method
inside the DLL. The application is multi threaded so that two or more
threads may be trying to write to the file at once. If one thread is
writing then another comes along and trys to write, it will get a file in
use error.
Should SyncLock (or ReaderWriterLock) be used inside the...
|
by: HONOREDANCESTOR |
last post by:
I have a buffer that needs to be locked sometimes, because 2 processes
update it.
So I made the buffer into a class and whenever there is code that
affects it, I sandwich the code between
Synclock MyBufferClass
...........
End Synclock
My question is, what is Synlock protecting? Is it just protecting
|
by: Rory Becker |
last post by:
I have had code in my Application_Start which is intended to run once at
the start of my application's life.
It loads connection information and similar from a known location.
However I recently migrated my app using
-------------------------------------------------------------
%systemroot%\system32\inetsrv\APPCMD.EXE migrate config "Default Web Site/YourApp"
-------------------------------------------------------------
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
|