When I load my executable in NUnit, the application appears to be "locked". I run the tests but when I want to make some modifications to them, I have to close NUnit first otherwise my compilation will fail.
Is there any workaround for this?
EDIT
According to Process Explorer, the only process accessing my executable right now are "nu...
I have made a simple Android app with a pin-code/screen lock. The user have to write a password to lock the phone and then repeat it to unlock the phone. The problem is that the user still can press back, home (etc) to exit the app without writeing the code. How can I prevent this?
...
I am using lucence.net which creates a file as a 'lock'. From what i can tell it simply creates a file to write to and if it cant the db is locked. I get the exception below
I call lucence_init() excepting it to happen once. I call it in Application_Start after i set the current working folder and other stuff.
I cant tell when this hap...
What happens to a Thread that fails to acquire a lock (non-spin)? It goes to the BLOCKED state. How does it gets executed again?
Lock lck = new ReentrantLock();
lck.lock()
try
{
}
finally
{
lck.unlock();
}
...
Looking for a minimal, futex-based implementation of a single-writer/multiple-readers lock requiring no space overhead beyond a single 4-byte futex state variable.
Some background: I have an application which will embed a lock within each of tens to hundreds of millions of small objects. Because of the very fine grained nature of the l...
I need to ensure that only one copy of my Perl script is running at a time. According to the suggestions here I wrote a sub to do the check:
sub check_instances {
open my $fh, '<', $0 or die $!;
unless (flock($fh, LOCK_EX|LOCK_NB)) {
print "$0 is already running. Exiting.\n";
exit 1;
}
}
But it doesn't ...
I have a UDP based application that is implemented using a thread pool.
Messages are pushed onto a queue and the thread pool is woken when there are things to do or messages on the queue. The thread pool processes each of the messages and hands them off to
session objects which hold some state. i.e. the UDP packets are part of a sessio...
Hi All,
I have List newJobs. Some threads add items to that list and other thread removes items from it, if it's not empty. I have ManualResetEvent newJobEvent which is set when items are added to the list, and reset when items are removed from it:
Adding items to the list is performed in the following way:
lock(syncLock){
newJobs...
I've been reading up on multithreading and shared resources access and one of the many (for me) new concepts is the mutex lock. What I can't seem to find out is what is actually happening to the thread that finds a "critical section" is locked. It says in many places that the thread gets "blocked", but what does that mean? Is it suspende...
I've been working on a small sand-boxed example to help me figure out how to use rwlocks. Everything seems fairly straightforward, however I'm getting deadlocks in my example every once and a while and don't understand why it's happening.
I've put the code example on pastebin because it's more than a few lines of code: http://pastebin.o...
Tested on Access 2003 Pro (build 11.8321.8324) SP3.
Steps to reproduce:
create a new database.
create a new form.
put a button on the form.
paste the following code in the button's Click event procedure:
Debug.Print Workspaces.Count
Debug.Print CurrentDb.Name
close the code editor and form, saving changes.
do not skip thi...
Hi everybody !
i have this scenario:
class MyClass {
Producer p;
Consumer c;
public static void main(String[] args){
BlockingQueue q = new LinkedBlockingQueue();
p = new Producer(q);
c = new Consumer(q);
Thread t = new Thread(p);
t.start();
new Thread(c).start();
while ...
A SO user asked a question to which the answer effectively was "use a locking mechanism".
While researching my answer, I discovered that there seems to be no simple, inter-process-reliable locking mechanism in PHP. flock() has a big fat warning:
On some operating systems flock() is implemented at the process level. When using a mult...
Hi All:
I have a question about MySQL InnoDB. For example: I have the following table created:
mysql>CREATE TABLE IF NOT EXISTS `SeqNum`
(
`id` varchar(10) NOT NULL,
`seq_num` BIGINT(30) default 0,
PRIMARY KEY(`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Query OK, 0 rows affected (0.00 sec)
mysql>INSERT IG...
My Activity locks its orientation by using setRequestedOrientation(). However, once this is set to something other than ActivityInfo.SCREEN_ORIENTATION_SENSOR, onConfigurationChange() is no longer called (since it is not changing anymore) when the user rotates their device.
Is there a way, after the orientation is set with setRequested...
lock(dictionaryX)
{
dictionaryX.TryGetValue(key, out value);
}
is locking necessary while doing lookups to a Dictionary ?
THe program is multithreaded, and while adding key/value to dict. dict is being locked.
...
I was downloading a package from a terminal. Actually i want to install some package 'A'. But,by mistake installing some other package 'B'. So, i wanted to stop the download of that package 'B' and start downloading 'A'. But, i couldnt able to do that. I reset my network connnection. I could stop downloading the package B. But, the admin...
I have a strange problem where when I run my tests using maven, it locks whenever a test method calls into an object with an annotation @Configurable. I can run the tests fine in IDEA using the AspectJ Weaver plugin (remarkably), but I cannot do it with maven (whether I execute them in IDEA or just in a terminal).
Even weirder, if I pre...
I have a multi threaded application that writes to a settings xml file using a static method. I want to avoid that the file is being updated twice at the same time (causing accesss/write exception).
How do I do that?
This doesn't work:
namespace Program
{
public class Settings
{
private static void SetSettingsValue (st...
I would like to know if locking my table is necessary in this situation (I'm using Coldfusion and MySQL):
I have a table called wishlists(memberId, gameId, rank, updateAt) where members store games in a personal list.
wishlists has a man-to-many with a members table, and many-to-many with a games table. Many members have many games sto...