With the wide variety of web development frameworks that are available, there always seems to be a perpetual incentive to "try something new". Hence, some of us find ourselves trading one framework for another, never being entirely satisfied with the end results. Granted there will always be niches where a given web framework will serv...
I'm writing a phonebook search, that will query multiple remote sources but I'm wondering how it's best to approach this task.
The easiest way to do this is to take the query, start a thread per remote source query (limiting max results to say 10), waiting for the results from all threads and aggregating the list into a total of 10 entr...
I start two threads with a Timer and TimerTasks
Timer timer = new Timer();
TimerTask task = new TimerTask() {
public void run() {
doSomething();
}
};
Calendar start = Calendar.getInstance();
timer.scheduleAtFixedRate(task, start.getTime(),
1000 * 60 * 60);
Now sometimes the second ...
I am running my java application where i have used threads...
i am running this application using ant command on the terminal..
But when i close my terminal or press ctrl+c,then java program which was running stops...
Please help me out to solve this as i want to run this program continously...
...
Recently I have been asked question in the interview whats the difference between process and thread. Really I did not know answer. I thought for a minute and gave very weird answer.
Threads share same memory.. processes do not. After answering this interviewer gave a evil smile and fired following questions at me:
Q. Do you know segm...
Hi folks,
i have a function which costs plenty of time.
this function is an sql-query called via odbc - not written in x++, since the functional range is insufficient.
while this operation is running, I want to show an animation on a form - defined in the aviFiles-macro.
trying to realize, several problems occur:
the animation doesn'...
I made this code example which successfully uses a BackgroundWorker to advance a progress bar in a for loop.
Now I'm trying to adapt it to work with the following recursive file copy method so that it shows me how far along the copying is, but the following code is giving me the error "This BackgroundWorker is currently busy and cannot ...
I have the following code in my program:
EnterCriticalSection(&critsec[x]);
// stuff
LeaveCriticalSection(&critsec[x]);
It works fine 99.999% of the time but occasionally a handle seems to get left behind. Now I have done the obvious things like make sure that x did not change value between the enter and make sure that there isn...
Hi all,
I want to make multiple instances of this class.
public class Worker
{
private object _lockObject;
private Thread _workerThread;
private string _name;
public Worker(object lockObject, string name)
{
_name = name;
_lockObject = lockObject;
_workerThread = new Thread(new ThreadStart(Do...
I have a browser enabled infopath form running within the XmlFormView control on a custom ASP.Net page in SharePoint.
The form needs to open a new browser window to perform some action and then act on a returned value from the browser window.
Currently using NotifyHost to tell the custom aspx page to render a window.open() javascript f...
Hi;
I have a C static library with,
A callback definition:
typedef void (*HandleEvents) (enum events eventID, int msgSize, char *msg);
A function in the library:
int init(HandleEvents _handleEvents)
And another C++ GUI developed in VS. which links this static lib and calls init function of the lib giving a function pointer.
ini...
Setup
WCF Service running in IIS 6
Caching - Enterprise.Caching
There's a business need to hold on to a message for a x amount of time(cache).
Another process will remove it from the cache. We may receive another message that will remove this message from the cache and prevent it from processing.
One way that I though of doing this i...
I've been doing some work on transactional memory and its viability for systems programming (databases, operating systems, servers, etc.). My own experience employing transactions, together with having seen how few communities use transactions in real code, has raised a question: What would convince you, a developer writing production co...
I have a C# app that needs to do a hot swap of a data input stream to a new handler class without breaking the data stream.
To do this, I have to perform multiple steps in a single thread without any other threads (most of all the data recieving thread) to run in between them due to CPU switching.
This is a simplified version of the si...
Hi,
I am writing an application for embedded linux where 5% of processor time is going in reading a file and 95% on processing it. Can I get some performance improvement if I read file in one thread and keeps on processing in another thread?
I am reading from mmc card which has DMA support. Filesize is of 20mb and it is devided in chun...
I have a Java webapp that's using PicoContainer for dependency injection. When I shut down the app, I sometimes get the following stack trace repeated a few times in my error log:
2009-11-18 17:32:29,352 ERROR [/] - Session event listener threw exception
java.lang.IllegalStateException: Cannot stop. Current container state was: STARTE...
I am trying to write to copy a file by invoking a separate thread.
Here is my form code:
unit frmFileCopy;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ComCtrls, StdCtrls;
type
TForm2 = class(TForm)
Button3: TButton;
procedure Button3Click(Sender: TObject);
proc...
I need some feedback on a threading problem that I am trying to solve.
The problem (this is coded as a winform application in C#)
I am comparing to lists which should be identical - if there is a discrepancy I popup a window and get the user to resolve the discrepancy by indicating which items are new and which items were deleted. The i...
I've read a lot about how great Clojure is when it comes to concurrency, but none of the tutorials I've read actually explain how to create a thread. Do you just do (.start (Thread. func)), or is there another way that I've missed?
...
Hello! I found an ambiguous place in one django-based application that I use in my project, please look at that:
if not request.method == 'POST' or not request.POST.get('openid'):
raise RedirectException(next, _('Invalid POST data'))
if not UserAssociation.objects.filter(user=request.user).count() > 1 and not request.user.email:
...