One thing I like about JSP is include mechanism. In JSP I can simply write:
<jsp:include page='/widget/foo-widget?param=value' />
It works very well when I have some sort of widget and I want incude it on some other page.
The other day I think, It would be nice if include doesn't block thread control, so if I have several includes, t...
I'm sorry if my title is a little unclear. Basically I want to print a '.' every second for five seconds then execute a chunk of code. Here is what I tried:
for iteration in range(5) :
timer = threading.Timer(1.0, print_dot)
timer.start()
#Code chunk
It seems as though that Timer starts its own thread for every instance, so th...
I'm reading up on concurrency. I've got a bit over my head with terms that have confusingly similar definitions. Namely:
Processes
Threads
"Green threads"
Protothreads
Fibers
Coroutines
"Goroutines" in the Go language
My impression is that the distinctions rest on (1) whether truly parallel or multiplexed; (2) whether managed at th...
Hi,
I'm developing a GUI app in c#.
Its a multithread app, and I would like to wrap all the threads (some of them I don't open e.g. NetClient.StartDownload which is none blocking function) with a try/catch . Statment so that if an exception is thrown an uncought, I could log it and report to base.
I tried using Application.ThreadExcep...
Hi,
I have a problem with my code.
I lunch the thread and this thread have a NSTimer.
I must remember a variabile location but when i repeat the method i reinitialize these and i lose the progress.
Can you help me?
Thanks
My code:(these isn't my very code but is the same situation. I want remeber the number of the i but when restart the...
Hi
i have a problem with the code below. the mail is sent with a duplicate content of the string s. why is this happening?
static void Main(string[] args)
{
List<String> liste = new List<String>();
liste.Add("1");
liste.Add("2");
liste.Add("3");
liste.Add("4");
liste.Add("5");
...
I want to parallelize some file-parsing actions with network activity in powershell. Quick google for it,
start-thread looked like a solution, but:
The term 'start-thread' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the ...
Possible Duplicate:
Java: Thread.currentThread().sleep(x) vs. Thread.sleep(x)
whats the difference between...
Thread.currentThread().sleep(time)
and
Thread.sleep(time);
one more thing is there anyother method by which i can delay in program without using Thread Class...
...
What is your opinion regarding a project that will try to take a code and split it to threads automatically(maybe compile time, probably in runtime).
Take a look at the code below:
for(int i=0;i<100;i++)
sum1 += rand(100)
for(int j=0;j<100;j++)
sum2 += rand(100)/2
This kind of code can automatically get split to 2 different thr...
(Edit: to clarify, my main goal is concurrency, but not necessarily for multi-core machines)
I'm fairly new to all concepts on concurrency, but I figured out I needed to have parallel drawing routines, for a number of reasons:
I wanted to draw different portions of a graphic separatedly (background refreshed less often than foreground...
I was sure there was something like this in the standard library, but it seems I was wrong.
I have a bunch of urls that I want to urlopen in parallel. I want something like the builtin map function, except the work is done in parallel by a bunch of threads.
Is there a good module that does this?
...
Im trying to implement a scenario using threads to execute concurrent commands on a server. The commands just send requests to a service running on the server and in return get the required output.
The commands are generated based on reading a file, whose path the user gives as input to the application.
Based every line that is in the a...
I seem to be having trouble with Threading.
First let me explain how the application is built.
I have a class that extends ApplicationContext, witch is my core class for the whole application, within this class I load new windows such as the login window.
then each window talks back and forth to the application context class.
I have ...
I have an application that is transferring files across the network, doing FTP, etc. I am launching these tasks using the new Task functionality in .NET 4.0.
Aside from a problem where I have not figured out why my application hangs when running in Debug or Release from the IDE, the application has been deployed to a test server and ha...
I know that now that most processors have two or more cores, multicore programming is all the rage. Is there functionality to utilize this in Java? I know that Java has a Thread class, but I also know this was around a long time before multicores became popular. If I can make use of multiple cores in Java, what class/technique would I us...
Code:
public string GetTextWebRequest(string url)
{
WebClient cl = new WebClient();
cl.DownloadStringCompleted += new DownloadStringCompletedEventHandler(cl_DownloadStringCompleted);
cl.DownloadStringAsync(new Uri(url));
are.WaitOne();
return _textdata;
}
void cl_DownloadStringCom...
I have a multi-threaded Delphi 6 Pro application that I am currently working on heavily. If I set a breakpoint on any code that runs in the context of the Main thread (VCL thread) I don't have any problems. However, if a breakpoint is triggered on any code in one of my other threads, after I continue the application from the breakpoint...
Hi,
I want to be able to handle input from a server through a Socket and pass it to a method to process it. I am trying to implement this through a class that implements runnable, with a loop in the run statement such as:
public void run()
{
while(notDisconnected)
{
line = readLineFromServer();
if (!(line...
I'm writing a threading.Thread subclass that implements 'callable' methods.
Normally with an arbitrary method on a thread, the method runs in whatever thread calls it. These methods run in the thread that they are called on and either block further execution in the calling thread or return a means to get the result depending on which de...
I wrote a thread application which runs an infinite loop. The problem is since its defined as a thread the loop is not holding and process hostage but does use up a lot of my processing power hence reducing my battery life. Now I know this is not how normally programs a written but considering the fact that rouge applications may be buil...