|
UNIX file-locking is dead-easy: The operating system assumes that you know what you are doing and lets you do what you want:
For example, if you try to delete a file which another process has opened the operating system will usually let you do it. The...
Started by Salim Fadhley on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Otherwise, other processes cannot open the file or....
According to MSDN you can specify to CreateFile() 3rd parameter (dwSharedMode) shared mode flag FILE_SHARE_DELETE which:
Enables subsequent open operations on a file or device to request delete access .
|
|
When is it appropriate to use <cflock scope="application"> or it's ilk as opposed to <cflock name="foo">?
Specifically, I'm interested in using CFLock to protect shared objects in the application, session, or server scopes, but I'm also interested...
Started by Adam N on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Named locks....
The exception is Application.cfc's and server scopes.
Wherever application.myData is used, you need a type="readonly" lock.
Select * from myTable </cfquery>
You are going to want to lock that with type="exclusive".
|
|
I'm just starting out with CakePHP, and I can't find any support for implementing an optimistic locking scheme. The closest I could find was a comment on this CakePHP blog post saying that it wasn't supported in June 2008.
Does anyone know if that has...
Started by Don Kirkby on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
I haven't tried it yet, but it looks quite good actually. .
locking.
|
Ask your Facebook Friends
|
I want to copy a live production database into my local development database. Is there a way to do this without locking the production database?
I'm currently using:
mysqldump -u root --password=xxx -h xxx my_db1 | mysql -u root --password=xxx -h localhost...
Started by Greg on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
About locking while you dump simply use the option:
--lock-tables=false
Does the --no-lock-tables option work?
According to the man page, if you are dumping InnoDB tables you can use the --single-transaction option:
--lock....
|
|
I came across this article discussing why the double-check locking paradigm is broken in java. Is the paradigm valid for .net (in particular, C#), if variables are declared volatile?
Answer Snippets (Read the full thread at stackoverflow):
Note than in Java (and most likely ....
Checked locking and "lock every time" code I'd go for locking every time until I'd got real that double locking is less likely to work than other strategies and thus should not be used.
|
|
I'm trying to get my multithreading understanding locked down. I'm doing my best to teach myself, but some of these issues need clarification.
I've gone through three iterations with a piece of code, experimenting with locking.
In this code, the only ...
Started by Chris on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Care to comment about, there are books which recommend Thread... .
(If it's immutable, no locking locking, and you need to lock in both the reading and the writing thread.
2) Yes, you should lock all access to shared mutable data.
|
|
I understand the differences between optimistic and pessimistic locking*. Now could someone explain to me when I would use either one in general?
And does the answer to this question change depending on whether or not I'm using a stored procedure to perform...
Started by Jason Baker on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Oh,....
It's essential that the data is accurately read, with no un-shown changes - the extra locking overhead is worth it.
Optimistic locking is used when.
Transactions to read-committed or no-lock to avoid deadlocks while reading.
|
|
Can anyone recommend a way in Windows XP or later to make it possible for users to access cmd.exe while locking out the ability to use type ?
Started by FBerthold on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
You could.
I believe that type is built into the shell's command parser itself, so I'm thinking no.
|
|
Hi.
Investigating/researching mysql/myisam locking. trying to find a good example of how to set the lock in appA, and determine/detect the tbl lock in appB.
searching google, not seeing much, so i must be missing something.
i'm going to be writing a php...
Started by tom smith on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
GET_LOCK is available....
MySQL's GET_LOCK with myisam.
Follow this link to get more information: MySQL Documentation for GET_LOCK()
This looks like it could solve your problem.
You should have a look at MySQLs GET_LOCK() function.
|
|
When I'm online it seems that everyone has agreed that using the exclusive locking workflow in source control is a Bad Thing. All the new revision control systems I see appear to be built for edit and merge workflows, and many don't even support exclusive...
Started by T.E.D. on
, 9 posts
by 9 people.
Answer Snippets (Read the full thread at stackoverflow):
Once have programmers frequently wanting to edit....
Locking is an old school of thought for textual Code.
Here's my $0.02.
Having an exclusive lock is necessary to be merged).
I like having the option to exclusive-lock some file[s].
|