|
Simplest explanation I can produce:
In my .NET1.1 web app I create a file on disc, in the Render method, and add an item to the Cache to expire within, say, a minute. I also have a callback method, to be called when the cache item expires, which deletes...
Started by Matt W on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Now doesn't work, but that might....
At this time the Call back function can acquire the lock and delete the file.
Edit
The real issue here is how by the lock.
A lock on the same object is if they are running in the same thread.
|
|
I noticed when a file is executed on Windows (.exe or .dll), it is locked and cannot be deleted, moved or modified.
Linux, on the other hand, does not lock executing files and you can delete, move, or modify them.
Why does Windows lock when Linux does...
Started by David Lenihan on
, 7 posts
by 7 people.
Answer Snippets (Read the full thread at stackoverflow):
Hence, windows doesn't need to lockI think linux / unix doesn't use the same locking mechanics because they are built from the ground it is forced to lock the ....
This is used for executables on CD or network drives .
In swap.
|
|
I have an archive object which manages various byte arrays and hands out InputStream s and OutputStream s for reading and writing them. Each byte array has an associated ReentrantReadWriteLock .
The constructor of the subclass of InputStream which the...
Started by uckelman on
, 7 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
For the InputStream, why does the byte array need to have a lock associated the InputStream from this object which....
Have how your locking works.
Clients releasing the lock, what if one of them does not? This is not good encapsulation.
|
Ask your Facebook Friends
|
We all know that having a good note taking tool is important as a developer.
However, OneNote and Evernote forces us to be locked in to a particular vendor.
Anyone know of good open-source tools, or even other method of taking notes w/o being "locked-...
Started by moogs on
, 18 posts
by 18 people.
Answer Snippets (Read the full thread at stackoverflow):
You can export for multiple platforms and....
Guaranteed no lock-in whatsoever the "locked to vendor" thingie :) Evernote API
Evernote doesn't force you to be locked in.
Use a text editor and save as a text file .
Pen and paper.
|
|
I regularly use RDP to connect to my home computer (WinXP Pro SP3) from work (WinXP Pro SP3). My home computer has multiple users set up with Fast User Switching enabled. The problem is that my wife and kids are able to log in while I'm connected via ...
Started by Jeremy Luce on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at superuser):
So unless your wife and kids know your password they won't be able .
Account and lock it from there.
|
|
Hi,
I am working on a solution consisting of 8 .NET projects. Since I am practicing TDD, I have to re-compile my solution very often. Lately I have been getting the following error about every second time when trying to compile:
Error 2 Unable to copy...
Started by Adrian Grigore on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
Visual Studio has had....
You probably had an itinerant thread that is still executing, and it has the reference to the .DLL .
The most likely problem is a threading issue.
Process Explorer is able to delete the handle.
I've faced the same problem before.
|
|
I'm still confused... When we write some thing like this:
Object o = new Object(); var resource = new Dictionary<int , SomeclassReference>();
...and have two blocks of code that lock o while accessing resource ...
//Code one lock(o) { // read from...
Started by SilverHorse on
, 8 posts
by 8 people.
Answer Snippets (Read the full thread at stackoverflow):
You can lock on any object, you may want use a....
Yes, using a lock is the right way to go.
Be a singleton or scoped across everywhere that lock is needed, as what is REALLY being locked is that object, it will have to wait.
|
|
I have a 2004 Silverado Crew Cab Z71 LT with power locking/unlocking.
Recently, I noticed that although the REAR doors power UNLOCK properly (from the front door lock/unlock switches or the remote), they don't power LOCK. Since the FRONT doors power lock...
Started by Tenaya on
, 5 posts
by 4 people.
Answer Snippets (Read the full thread at gm-trucks):
The voltage computer to the rear door lock....
Further, it appears that the voltage on the line during a lock sequence is far below the voltage during an unlock sequence.
But it won't power lock it (the actuator doesn't run).
|
|
[2001 350 lwb hi-top] The rear door lock barrel doesn't work with the key. Also there seems to be something missing from the inside (turning handle??) which has never been there since I've owned the van... so the only way I can lock it it by using a key...
Started by Nick Storm on
, 2 posts
by 2 people.
Answer Snippets (Read the full thread at fordtransit):
Ford dealer should have diagrams of lock and components, have a look and see what's missing before.
|
|
In a c# threading app, if I were to lock an object, let us say a queue, and if an exception occurs, will the object stay locked? Here is the pseudo-code:
int ii; lock(MyQueue) { MyClass LclClass = (MyClass)MyQueue.Dequeue(); try { ii = int.parse(LclClass...
Started by Khadaji on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
} finally { Monitor.Exit(lockObj); }
Second; you catch and don't re-throw the ... .
Is now assigned } else { // input string is dodgy }
The lock will be released for 2 reasons; first, lock is essentially:
Monitor.Enter(lockObj); try { // ...
|