|
We have a method in the iPhone SDK that is a delegate method. Problem is, the OS calls this method twice at the exact same time. This method does some heavy lifting so I don't want to execute the logic twice. What is a good way to detect this and prevent...
Started by erotsppa on
, 9 posts
by 9 people.
Answer Snippets (Read the full thread at stackoverflow):
If you can handle some sleeps on the thread, use a nslock
- (id)init { theLock = [[NSLock alloc] init]; } - (void)action....
If they are called at the exact same time, I guess of interlocking.
You need to put all this in a mutex block .
|
|
I hate asking questions like this - they're so undefined... and undefinable, but here goes.
Background: I've got a DLL that is the guts of an application that is a timed process. My timer receives a configuration for the interval at which it runs and ...
Started by BenAlabaster on
, 9 posts
by 9 people.
Answer Snippets (Read the full thread at stackoverflow):
I often use a "heartbeat", where each active thread? If you can't, then there is probably some sort....
Difference in execution: You have two apps running the same code in which your console app is running.
Must have been to the environment.
|
|
I walked up to the gun show (an hour ago) and bought a gun without even entering the event.
I own two glock 19's and bought another one ($400) off of a guy standing outside.
My intentions were to start looking at larger caliber glocks (a 20 or 21), but...
Started by bfskinnerpunk on
, 16 posts
by 13 people.
Answer Snippets (Read the full thread at thefiringline):
You have one that you carrry to own dozens of 1911's and not... .
Having 2 or 3 of the same gun is actually a really good idea.
On getting another 92fs...I will get the exact same thing if I find it on saled at gander mountain I don't.
|
Ask your Facebook Friends
|
Hi, I'm trying to make a load of different images ALL the same size. Now because some are differently proportioned I would like to select just a part of that image, usually losing some of the border. Trouble is, when I use the square selection tool in...
Started by Lol999 on
, 13 posts
by 5 people.
Answer Snippets (Read the full thread at webdesignforums):
You can crteate an empty file.
Of the techniques mentioned in the thread was the one you found useful.
|
|
My TextBox won't update! I am using it as a Log to update what other things are doing...
Form 1 code:
using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; using System...
Started by OneShot on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
What thread are you calling Logging.updateLog() from? If it's not the UI thread, I could see that the TextBox wouldn't get updated from the UI thread....
With:
debug.WriteLine( this.Log.Items( this.Log.Items.Count-1));
Hope that helps you.
|
|
Reasons and bad experiences would be appreciated
Started by NES on
, 14 posts
by 13 people.
Answer Snippets (Read the full thread at therxforum):
Continental was a great airline before the merger, but Gordon Bethune .
Is the same airline now.
United hands down Lot of good reasons in this thread
Southwest Airlines for most all U.S.
To Rio.
|
|
Rofl guilty
Started by Gayb on
, 24 posts
by 11 people.
Answer Snippets (Read the full thread at nonewbs):
That's horrible.
|
|
I am doing a BHO (extension for IE) that receives events on other thread. When I access the DOM from that other thread, IE crashes. Is it possible to make the DOM accessed from the same thread as the main BHO thread so that it does not crash?
It seems...
Started by yuku on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Hope this helps COM object that is ....
A Single Threaded Apartment, so that the COM runtime system ensures that it is run on the same thread to the DOM through a separate COM object marked as STA to achieve the same effect.
|
|
The following code leads to "java.lang.IllegalThreadStateException: Thread already started." the second time it is run through on the program.
updateUI.join(); if (!updateUI.isAlive()) updateUI.start();
This happens the second time updateUI.start() is...
Started by Will on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
Furthermore:
Throws:
IllegalThreadStateException....
In particular, a thread may not be restarted once it has completed execution.
From the Java API Specification for the Thread.start method:
It is never legal to start a thread more than once.
|
|
I wrote a Java program to add and retrieve data from an MS Access. At present it goes sequentially through ~200K insert queries in ~3 minutes, which I think is slow. I plan to rewrite it using threads with 3-4 threads handling different parts of the hundred...
Started by Martin on
, 8 posts
by 8 people.
Answer Snippets (Read the full thread at stackoverflow):
And I agree totally about dumping.
But wait," you say, "I'll create a unique Connection object in each thread."
Noble, but sometimes connections to te same file because of the locking policy it uses.
|